Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

isql output file - Getting rid of (return status = 0)

Status
Not open for further replies.

tbrock03

Programmer
Jul 9, 2002
6
US
Does anyone know how to get rid of the (return status = 0) on the bottom of my output text file when running my sql job? I have tried to 'set nocount on' but it doesnt seem to work.
 
How are you running the script? What platform?

We kick a lot of isql jobs off via unix shell scripts, and pipe the output to grep -v 'return status ='. Unfortunately 'nocount' only gets rid of the ".... rows affected" lines.

Greg.
 
I am running on Sybase, but through a Smartstream job.
My command line is as follows:

isql -U (user) -P (password) -i xxx/sqlfile -o xxx/outputfile.txt -w 2000

Does grep -v 'return status =' get rid of the line?
 
Never heard of Smartstream :-( If you're on Unix, the command line would read ...

isql -Uuser -Ppassword -w 2000 -i xxx/sqlfile | grep -v 'return status =' > xxx/outputfile.txt

Greg.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top