April 19, 2005 at 8:50 am
Please can anyone tell me if there is a tsql equivalent of Oracle sql plus 'set linesize' command? I read a previous post on this but it didn't make any sense (mainly cos the answer just showed up as a red cross on my screen!!)
Thanks,
Paula.
April 19, 2005 at 9:07 am
Can you please let us know what SET LINESIZE does so we can say yay/nay about the equivalent?
Good Hunting!
AJ Ahrens
webmaster@kritter.net
April 19, 2005 at 9:11 am
Oh sorry! Forgot this was a sql server only site! It enables you to set the number of characters allowed on a line when producing something like a comma separated file. So you may set your linesize to 300 and produce a file, but for your next file, you may wish to concatenate many more fields, so you would therefore set linesize to 1000 or whatever. If you don't have your linesize big enough, it produces gobbledegook at the end of the lines, rather than the data you expect.
Thanks.
April 19, 2005 at 10:05 am
If you are attemping to use isql.exe (the equivalent of SQLPlus), see the Books On Line documentation for the command switchs such as listed below.
If you are attempting to write a file from the results of a query, recommend you use Data Transformation Services not isql.exe
- h headers
Specifies the number of rows to print between column headings. The default is to print headings one time for each set of query results. Use -1 to specify that no headers will be printed. If using -1, there must be no space between the parameter and the setting (-h-1, not -h -1).
-s col_separator
Specifies the column-separator character, which is a blank space by default. To use characters that have special meaning to the operating system (for example, | ; & < >, enclose the character in double quotation marks (").
-w column_width
Allows the user to set the screen width for output. The default is 80 characters. When an output line has reached its maximum screen width, it is broken into multiple lines.
SQL = Scarcely Qualifies as a Language
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy