charu.verma (12/1/2009)
HiAs per above suggestions, I tried to use tab as a query separator but still all the query data is coming in the same column..Is there something that I doing wrong??
EXEC msdb.dbo.sp_send_dbmail
@recipients=N'cv@xx.co.uk',
@body= 'Please find attached',
@subject = 'Test Email from SQL Server',
@profile_name ='DBMailProfile' ,
@query = 'exec uat.dbo.csp_Report 1,1',
@attach_query_result_as_file = 1 ,
@query_result_separator = ' ',
@query_result_no_padding = 1,
@query_result_header =0,
@query_attachment_filename = 'report.csv';
Im quite stuck here as all query data is coming as one row without column separation
Thanks
Did you make sure that there is a tab space between the quotes?
When I do it, there is a marked space like ' '