April 3, 2013 at 10:49 am
IN SQL
I want to print for example
Ali
is going to Alex
so I said
declare @x varchar(max) set @x = 'Ali' + CHAR(10) + 'is going to Alex'
in some servers it work very well in tohers not even with using CHAR(13)
the output appear in one line instead of two ones
any idea how to fix that, and make it work in all servers
April 3, 2013 at 11:02 am
how are you determining it doesn't display right on some servers but not other servers?
the data will have the control characters no matter what in them, but it's up to the presentation layer to determine whether to display something as multi line or not.
note, for example, in SSMS, the gridview never wraps to multi line, only text view does; could it be something that simple?
Lowell
April 4, 2013 at 11:34 am
There are two different ways to display query results in the SQL Server Management Studio (SSMS) - text or grid view. Per the previous post, they act differently.
I guess the question is where are you determining it does not work??
Remember, WINDOWS versus UNIX differs in end of line (EOL) markers. WINDOWS = CR+LF: CR (U+000D) followed by LF (U+000A), UNIX = LF only.
Something many people forget when transferring files.
We wait to hear back from you on what tool you are using to determine that the EOL characters are not there.
John Miner
Crafty DBA
www.craftydba.com
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply