Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to modify sql job to remove extra information coming in text file Expand / Collapse
Author
Message
Posted Wednesday, July 10, 2013 2:26 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, April 9, 2014 1:40 PM
Points: 39, Visits: 146
I am exporting the sql query result set to a text file and its writing without the issue,


i want to eliminate lot of extra information it is writing For example


Job 'myNIC_PROD_ActiveUsers_In_Last5Minutes' : Step 1, 'Active_Users' : Began Executing 2013-07-04 18:25:47

NumberRows Time_stamp
----------- ------------------------------------------------------
39 2013-07-04 18:25:47.630


(1 rows(s) affected)


So i only need to see Bold text in this post
Post #1472359
Posted Thursday, July 11, 2013 2:51 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Saturday, October 11, 2014 11:41 AM
Points: 806, Visits: 723
Run the job as a CmdExec job that runs sqlcmd that directs the output to the desired file. Include SET NOCOUNT ON to get rid of "1 rows affected".

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
Post #1472472
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse