• Ed Wagner (2/11/2013)


    Unfortunately, SQL Server doesn't like to have concatenated stuff passed to parameters. So, you could do something like this:

    declare @strBody varchar(255);

    select @strBody = 'This is to test that today is ' + CONVERT(VARCHAR(12), GETDATE(), 101) + ' and it is a good day';

    EXEC msdb.dbo.sp_send_dbmail

    @recipients = 'someone@yahoo.com',

    @subject = 'Test',

    @body = @strBody;

    That was good. Thanks