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
 SQL Server Development (2000)
 ISQL - Print more than 256 characters on a line

Author  Topic 

nbkr3bi
Starting Member

15 Posts

Posted - 2007-05-14 : 06:36:20
I am using isql to execute a stored procedure and write the output to a file.
I need the output to be on a single line. however the output beyond 256 characters is getting truncated even though i am using -w500 switch
isql -Uabc -Pabc -dDesktop -SMyserver -Q "exec MyProc" -o D:\apps\log\out.txt -n -w500
Any pointers??

Kristen
Test

22859 Posts

Posted - 2007-05-14 : 08:19:32
Do you need -X as well?

Kristen
Go to Top of Page

nbkr3bi
Starting Member

15 Posts

Posted - 2007-05-14 : 08:39:25
doesnt work. :-(
isql -Uabc -Pabc -dDesktop -SMyserver -Q "exec MyProc" -o D:\apps\log\out.txt -n -w500 -x8192
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-14 : 10:12:31
Tried osql?
Go to Top of Page

nbkr3bi
Starting Member

15 Posts

Posted - 2007-05-14 : 10:46:05
osql does print all the characters, but now there is a new issue. There are lots of line in between the column name and the output.

It looks like this:

COL_NAME
------------------------------------------------------------------
------------------------------------------------------------------
------------------------------------------------------------------




<COL_VALUE>

Any solution?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-14 : 11:58:20
What's column length of col_name?
Go to Top of Page

nbkr3bi
Starting Member

15 Posts

Posted - 2007-05-15 : 00:42:27
Actually i am appending different columns with formatting ,forming a string and displaying it as COLUMN_NAME.
Its length can vary. It is around 600 characters
Go to Top of Page

nbkr3bi
Starting Member

15 Posts

Posted - 2007-05-15 : 07:59:11
Okay, i managed to make it work :)
ISQL truncates all varchar data to 255 chars, so i converted it to text using CONVERT function and it worked
Thanks to everyone for their help
Go to Top of Page
   

- Advertisement -