December 17, 2003 at 1:49 am
Hi,
how ti implement Sybase's new line (hexadecimal '\x0D\x0A' ) in Sql Server?
Thanks,
Jelena
December 17, 2003 at 1:54 am
Do you mean something like this?
SET NOCOUNT ON
CREATE TABLE MyTable(
MyColumn varchar(100)
)
go
INSERT
MyTable ( MyColumn )
VALUES
( 'this is the first line' + CHAR(10) + CHAR(13) + 'This is the second line' )
SELECT
*
FROM
MyTable
DROP TABLE MyTable
SET NOCOUNT OFF
results in
MyColumn
------------------------
this is the first line
This is the second line
Frank
Sorry for editing !!!
Edited by - Frank Kalis on 12/17/2003 01:54:43 AM
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 18, 2003 at 10:17 am
And, when the above answer doesn't work, use CHAR(13) + CHAR(10), which is a CR (carriage return) followed by a LF (line feed).
Note: Some computer systems use only a "newline", which is CHAR(10).
December 28, 2003 at 12:49 pm
quote:
And, when the above answer doesn't work, use CHAR(13) + CHAR(10), which is a CR (carriage return) followed by a LF (line feed).Note: Some computer systems use only a "newline", which is CHAR(10).
To be exact and don't go for speculations:
Windows-based machines use CHAR(13)+CHAR(10) as new-line character
Unix-based machines use CHAR(10) as new-line character
MacOS-based machines use CHAR(13) as new-line character
best regards,
chris.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply