I am using "sp_send_dbmail" to send Email notifications form the database which is SQL Server 2005.
When the Email is sent in TEXT format (Parameter @body_format = 'TEXT'), the result of the parameter "@query" appears good in a tabular format in the email body.
But the problem is that when I change Email body format to be HTML (@body_format = 'HTML'), I find the result of the "@query" is distorted and all the records is fomated in one text line without any sperator between records.
Can any one tell me how to format the result of the Query ?
When the Email is sent in TEXT format (Parameter @body_format = 'TEXT'), the result of the parameter "@query" appears good in a tabular format in the email body.
But the problem is that when I change Email body format to be HTML (@body_format = 'HTML'), I find the result of the "@query" is distorted and all the records is fomated in one text line without any sperator between records.
Can any one tell me how to format the result of the Query ?