Hi,
I am creating SP to send email and have email body:
SET @body =CAST((SELECT Time AS 'td','',
User AS 'td','',
Address 'td','',
Telephone AS 'td'
FROMTemporary.#Table AS tb
ORDER BY tb.Time
FOR XML PATH('tr'), ELEMENTS
) AS NVARCHAR(MAX));
I need to display results before sending email. I know SQL does not support HTML tags but could I get results with tags printed out, I will paste code to test.html and will get required results? Have tried PRINT @body, but it does not works, also SELECT @body does not works, what I missed?
thank you