Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 isql output only show half result?

Author  Topic 

fredong
Yak Posting Veteran

80 Posts

Posted - 2004-01-07 : 14:49:20
I have store procedure with with a select statement look like below

select
'//STX12//850ABCDEF '+a.TranID+' '+a.Docno+' '+char(13)+
'0100NE'+a.PO_No+a.PODate+char(13)+
'02'+' '+' '+char(13)+
'03'+' '+char(13)+
'04'+' '+' '+' '+char(13)+
'05ST ZZ'+char(13)+
'06'+a.ShipTowhsecode+' '+char(13)+
'07'+'DEF '+char(13)+
'08'+' '+char(13)+
'09'+' '+char(13)+
'10'+' '+char(13)+
'11'+' '+char(13)+
'12'+' '+char(13)+
'13'+' '+char(13)+
'14'+' '+char(13)+
'15'+' '+char(13)+
'16'+' '+' '+' '
from WWWW a, ZZZZ b
where a.id_num = b.Countrow

when run the isql in a batch file with the parameter below:

isql -SServername -ddatabasename -Usa -Pxxxx -h-1 -n -s* -w500
-iC:\EdiTest.txt -oC:\editoutput.txt

I get only less than half of the results in the outputfile below:

//STX12//850ABCDEF 000000000000000000000401071428 0401071428
0100NE000000000000000003701720021119
02
03
04
05ST ZZ
0655109998


-- line 07,08 and till 16 are not showing It works before just don't know what happened.Please advise. Thanks.



k

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-01-07 : 15:39:05
Have you run the query in Query Analyzer to see how many rows you should get and compared that to the results in the output file?

Tara
Go to Top of Page

fredong
Yak Posting Veteran

80 Posts

Posted - 2004-01-07 : 15:47:12
funny thing is I exexcute the Store procedure in DBArtisan( A third party Query tools)and the results return correctly. But if I run in Query Analyzer it return half of the result just like the isql output file.Is there some options that I changed affected it? Please advise.Thanks.


k
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-01-07 : 15:50:17
If you could provide the data in the form of INSERT INTO statements and the table definition in the form of CREATE TABLE statements, then we could duplicate the scenarion on our ends.

Have you tried osql? osql is the new version; isql is being phased out.

Tara
Go to Top of Page

fredong
Yak Posting Veteran

80 Posts

Posted - 2004-01-07 : 15:58:58
I tried osql it fixed my problem, in addition, I changed the Query Analyzer option on the Results tab Max col width to 8192 and it fixed the problem too. Thank you.

k
Go to Top of Page

fredong
Yak Posting Veteran

80 Posts

Posted - 2004-01-07 : 16:00:24
By the way what is the difference between isql and osql?

k
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-01-07 : 16:01:45
http://dbforums.com/arch/203/2003/3/738023

Tara
Go to Top of Page
   

- Advertisement -