May 1, 2015 at 4:58 am
I have a T-SQL query that outputs exactly as I wish when run via Management Studio. I now want to automate this query to run monthly via a SQL Agent Job.
I have got this to run but the resulting file is left with a header row which shows "Job 'MyJobName' : Step 1, 'My QUERY' : Began Executing 2015-05-01 10:52:01" and an extra blank row before my data (and column headers).
Is there any way of stopping these extra rows from being created using T-SQL in my query?
Thank you in advance
Paul
May 3, 2015 at 4:30 am
Paul Webb-223029 (5/1/2015)
I have a T-SQL query that outputs exactly as I wish when run via Management Studio. I now want to automate this query to run monthly via a SQL Agent Job.I have got this to run but the resulting file is left with a header row which shows "Job 'MyJobName' : Step 1, 'My QUERY' : Began Executing 2015-05-01 10:52:01" and an extra blank row before my data (and column headers).
Is there any way of stopping these extra rows from being created using T-SQL in my query?
Thank you in advance
Paul
Can you post your query code, not much one contribute to this without it.
😎
May 3, 2015 at 5:20 am
many wanted to remove header from SQL Agent job step output file - all failed.
you can convert job step to CmdExec and call osql -o, or to Integration Services Package, and export data from there.
append CmdExec step to remove first 2 lines will be fine, too
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply