Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 12, 2005 01:23 PM by mko
Participant
1555 Points
342 Posts
Nov 07, 2005 05:45 PM|LINK
Member
460 Points
92 Posts
Nov 07, 2005 07:46 PM|LINK
You can use CHAR(13) to insert a carriage return into the string. e.g.
INSERT INTO MyTable (MyStringColumn) VALUES('My name is'+CHAR(13)+'Colin Mackay') See also SQL Server Books-On-Line: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_6xte.asp Does this help?
Nov 12, 2005 01:23 PM|LINK
mko
Participant
1555 Points
342 Posts
How to add newline in column of type nvarchar
Nov 07, 2005 05:45 PM|LINK
I want to add a newline in a content of sql column (using t-sql and not asp.net textbox) so when content is being rendered in a .net textbox I get separate rows, so instead
col1 col2 col3
I woule like to have
col1
col2
col3
Thanks
Colin Angus ...
Member
460 Points
92 Posts
Re: How to add newline in column of type nvarchar
Nov 07, 2005 07:46 PM|LINK
You can use CHAR(13) to insert a carriage return into the string. e.g.
INSERT INTO MyTable (MyStringColumn) VALUES('My name is'+CHAR(13)+'Colin Mackay')
See also SQL Server Books-On-Line: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_6xte.asp
Does this help?
mko
Participant
1555 Points
342 Posts
Re: How to add newline in column of type nvarchar
Nov 12, 2005 01:23 PM|LINK