September 10, 2006 at 12:35 am
HI
i have a strange problem.
im using th OSQL to print to a file
the is the command:
OSQL -S serverName -Q"exec PrintToFile" -E -o test.txt
the 'PrintToFile' procedure simply prints every line in table using a format i built: ( it uses the PRINT function )
Example:
Path: ( a column )
.....
c:\asdasd\......\asdasd.x
c:\asdassss\qqqsd\asdasdf\qwerftdva\asdfsdfsdf\ff.x
......
Print should look like this: ( in test.txt )
.....
Path: c:\asdasd\asdasd.x
Path: c:\asdassss\qqqsd\asdasdf\qwerftdva\asdfsdfsdf\ff.x
......
the command works - i get my file in the correct format
but for some reason - when the it prints a long string ( about 200 chars ):
it writes the string in 2 lines.
Example:
Path: c:\asdasd\asdasd.x
Path: c:\asdassss\qqqsd\asdasdf\ ( // ??????? )
qwerftdva\asdfsdfsdf\ff.x
Does any1 know y this happens or is there a better way to print formatted rows into file ?????
September 10, 2006 at 10:19 am
Take a look at Books Online for the OSQL command... the problem is that the default output is set to 80 characters and you must invoke the "-w" parameter with the desired width setting to get full lines.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 11, 2006 at 10:51 pm
it works
thx
September 12, 2006 at 6:52 am
Outstanding... thank you for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply