Published on: 08 August, 2014

How to replace break line in TSQL?

Tumblr Digg Google Plus

To replace a break line is pretty simple, The Carriage return is represented by CHAR(13), while the Line Feed is represented by CHAR(10). You can use the following example replace method to do it.

REPLACE(REPLACE(REPLACE(FIELD_VALUE, CHAR(13) + CHAR(10), 'something else'), CHAR(13), 'REPLACE_VALUE'), CHAR(10), 'REPLACE_VALUE')
Note: The FIELD_VALUE is the original value that you want to replace with, this is usually the column field. while the REPLACE_VALUE is the value that you want to replace with.

Comments

There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.