Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 indent query resultset which is sent as email

Author  Topic 

imranabdulaziz
Yak Posting Veteran

83 Posts

Posted - 2009-03-22 : 07:35:04
Dear All,
I am using sql server 2005.
I have a stored procedure(it is scheduled in job) whereby I send query result in mail But I display data in very ackward way .I wanted to know is there any way so that I can indent the column and respective data displayed under their header


To send send I used follwing systex
if(@email is not null)
begin
exec msdb.dbo.sp_send_dbmail @profile_name = 'profile' , @recipients=@email , @execute_query_database = 'database' , @body = @bbody ,@attach_query_result_as_file =0 , @query = @qeury , @body_format = 'HTML' , @subject = 'Event list ' ,@query_no_truncate = 0,@query_result_header = 1,@append_query_error=1
end

Thank you
   

- Advertisement -