OSQL Supress Row Count?

  • EXEC master..xp_cmdshell 'osql -U______ -P______  -Q"select * from MyTable" -dAutoMail -h-1 .set NOCOUNT -oc:\output.txt', no_output

    I'm using this to output data from a table into a txt file.  Works fine, except I get the row count.

    Is there a parameter or something I can add to supress the row count.  I used -h-1 to get rid of the headers.

     

    Thanks 

  • I was close, figured it out.

     

    EXEC master..xp_cmdshell 'osql -U______ -P______  -Q"SET NOCOUNT ON select * from MyTable" -dAutoMail -h-1 -oc:\output.txt', no_output

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply