dbTalk Databases Forums  

Need help w/ sp_send_dbmail !

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Need help w/ sp_send_dbmail ! in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kataoki@gmail.com
 
Posts: n/a

Default Need help w/ sp_send_dbmail ! - 05-01-2007 , 03:57 PM






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 (AT) yahoo (DOT) 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.