Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Formatting output file after running it from isql

Posted on 2003-02-19
5
Medium Priority
?
576 Views
Last Modified: 2008-02-26
Hi,

  I would like to format the output file from isql. My command is something like this..

 isql -s "|" -i "inputfile" -o "outputfile" -b -w 400

 I have suppressed the (3 rows affected) message by including SET NOCOUNT ON in the stored procedure. But i'm getting 2 lines of "return status=0" in the output file which i would like to eliminate. I would  like the output file to have pure data with the delimiters. I would be thankful if I get some help to resolve this matter.

Thanks.
0
Comment
Question by:Jyothi_pg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:herrmann1001
ID: 7980800
The following link tells you about the changes between 10.x and 11.x  of ISQL...  Maybe you can do something about the tips in the end of the page.

http://www.sybase.com/detail?id=1013403


Best of times!
0
 

Expert Comment

by:vka3
ID: 7998871
Assuming you are on UNIX:

isql -s "|" -i <inputfile>  -b -w 400 | grep -v "return status=" | tee <outputfile>
0
 
LVL 4

Expert Comment

by:Vinit Kain
ID: 8007247
try this

isql -U$USERNAME -P$PASSWORD -S$SERVER -s"|" -o$RESULTFILE <<!
select * from table1,table2 where table1_Field1=table2_Field2
go
!
cat $RESULTFILE|sed -n "3,$ p"|grep ^\| > $RESULTFILE.temp
mv -f $RESULTFILE.temp $RESULTFILE
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11410330
PAQed - no points refunded (of 100)

modulo
Community Support Moderator
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whoever said that “a picture is worth one thousand words” observed a fact that can dramatically affect your marketing success. Most people tend to learn visually, so many publishers commonly acknowledge the effectiveness of visual learning by using…
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question