jposp
asked on
Sending query result as CSV file using DatabaseMail - problem with header
I want to attach as CSV query output, so i wrote something like that:
Output CSV file seems to be allright with one exception - secodn line:
How to get ridd of the second line with dashes ???
EXEC msdb.dbo.sp_send_dbmail
@profile_name= 'ReportsSQL',
@recipients= 'mail@gmail.com',
@subject='Report',
@query ='SET NOCOUNT ON;SELECT login, name, city FROM users;SET NOCOUNT ON;',
@attach_query_result_as_file = 1,
@query_attachment_filename= 'output.csv',
@query_result_no_padding = 1,
@append_query_error = 0,
@exclude_query_output = 1,
@query_result_header = 1,
@query_result_separator=';'
Output CSV file seems to be allright with one exception - secodn line:
login;name;city
-----;----;----
alex;Alexander;New York
misza;Misza;Moscow
How to get ridd of the second line with dashes ???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER