SQL Server 2008

5 pts.
Tags:
CRLF
SQL Server 2008
How to format crlf inside a field text

Answer Wiki

Thanks. We'll let you know when a new response is added.

Use the crlf function of what ever language you are using. For example if you are using VB use the VBCRLF to put a line feed in there. If you are using T/SQL then simply put a line feed within the String.

<pre>DECLARE @s as VARCHAR(100)

SET @s = ‘This is a string.
This is a second string’

print @s</pre>

When you view the value in the SQL grid it will always show as a single line. It you view it in the text mode the line feeds will show correctly.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following