|  | Posted by kataoki on 05/01/07 20:57 
SQL Server 2005
 Help. I have a problem:
 
 On a 2000 box, I am calling the sp_send_dbmail stored procedure on a
 2005 box (they are linked servers).
 
 This is how I'm calling the proc (from the 2000 box), which uses
 sp_send_dbmail to send the mail.
 
 EXEC My2005Server.DatabaseName.dbo.SendNotification
 
 @recipients = 'me@yahoo.com',
 @subject = 'SENDING @TOTAL,
 @body = @text1 + @text2 + @text3 + @text4 + @text5
 
 @text1 - @text5 are varchar(8000).
 
 As you can see I'm trying to take advantage of the varchar(max) that
 @body allows.
 
 However, I get this error:
 Server: Msg 170, Level 15, State 1, Line 22
 Line 22: Incorrect syntax near '+'.
 
 I need to be able to concatenate these somehow... as I cannot put them
 into one large variable from the 2000 server side.
 
 Can you see the problem here?
 
 Help.
 
 Thanks
 [Back to original message] |