I am using sp_send_dbmail. In my output, the seccond line is like:------;----;-------;----I would like my output without this line. Any ideas?The code I use is this:EXEC msdb.dbo.sp_send_dbmail @profile_name = 'VNPSQL email', @recipients = 'my@email.com', @query = 'SET NOCOUNT ON;SELECT * FROM NSG.dbo.test', @subject = 'Test', @attach_query_result_as_file=1, @query_attachment_filename = 'Test.csv', @query_result_header = 1, @query_result_separator = ';', @query_result_no_padding = 1
The Output is like thisdatoen;navn;adresse;land------;----;-------;----2015-02-02;Tom;Tromsø;Norge2015-01-07;Ray;Somerville;USA2015-03-08;Deng;Shanghai;Kina2015-03-17;Elzo;Lisboa;Portugal2015-01-02;Alejandro;Mexico City;Mexico2015-02-02;Jostein;Tokyo;Japan2015-02-06;Johan;Bergen;Norge2014-12-15;Audun;Roma;ItaliaZeb