Can this be done with xp_sendmail?

  • I keep getting the following syntax error;

    Server: Msg 170, Level 15, State 1, Line 12

    Line 12: Incorrect syntax near '+'.

    Basically, if i do not + the @MeetingName, it works.

    DECLARE @Message VARCHAR(2000)

    DECLARE @Subject VARCHAR(400)

    DECLARE @MeetingName VARCHAR(200)

    SET @Message = 'The following trace is due for completion.'

    SET @MeetingName = 'Information and Communication Technology Awards'

    EXEC MASTER..xp_sendmail @Recipients = 'jbloggs',

       @Message = @Message,

       @Subject = '1st Trace Reminder for ' + @MeetingName


    Kindest Regards,

  • SET @MeetingName = '1st Trace Reminder for ' + @MeetingName

    EXEC MASTER..xp_sendmail @Recipients = 'jbloggs',

       @Message = @Message,

       @Subject = @MeetingName

    Would help?

    _____________
    Code for TallyGenerator

  • Thanks.


    Kindest Regards,

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply