Groups | Blog | Home
all groups > sql server programming > september 2003 >

sql server programming : xp_sendmail



JJ Wang
9/2/2003 11:07:53 PM
Hi,

I am trying to set up a job to check on certain updates
done on my database, if no updates done, then it will send
out email to me use master..xp_sendmail.

when I try to assing @message, I want to assign a string
to it and a varchar variable after the string, which
contains yesterday's date: @message = 'There was no data
replicated in db1 table1 yesterday.' + @Yesterday + '.',
it complains at the '+'.

But if I do: PRINT 'There was no data replicated in db1
table1 yesterday, ' + @Yesterday + '.', it print out the
message successfully.

How should I do it?

Many thanks.

JJ
Jens Süßmeyer
9/3/2003 8:21:25 AM
Hello JJ !
Assign the message before sending it with sendmail, then parse the variable
to the procedure.
This will work perfectly and you have the change to debug your Message that
will be sent out.

HTH, Jens Süßmeyer.


"JJ Wang" <jwang@hotmail.com> schrieb im Newsbeitrag
news:06d101c371e1$b6764390$a501280a@phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button