Database Mail - adding a variable to the body?
Posted on 2010-09-01
I have a table which has a trigger assigned to it so when a new record is added it sends an email to a user.
I can't seem to get the syntax right though to include my own description and the variable for the new record entry.
Here is the TRIGGER:
@body= 'A new country has been added to the system: ' + @newcountryname,
@subject = 'New Country Added',
@profile_name = 'Me'
The trigger doesn't work due to the + symbol, I've searched google for the correct syntax but can't figure it out.
Any help would be much appreciated.