Friday, March 9, 2012

passing @parameters and TEXT to xp_sendmail message!

How do you pass parameters and text to the message area... i know how to pass parameters or pass text how do i do both... for example.
Exec master.dbo.xp_sendmail @.recipients = 'johndoe' @.message = 'hello and @.number'
PLZ HELP!!!!!!DECLARE @.strSQL varchar(8000)

SELECT @.strSQL = 'master.dbo.xp_sendmail @.recipients = ''johndoe'' @.message = ''hello and ' + @.number + ''''

EXECUTE(@.strSQL)

No comments:

Post a Comment