How to Remove Carriage Return Line Feed Tab From a String in TSQL

Thanks David for this post http://metadeveloper.blogspot.com.au/2006/03/remove-carriage-return-line-feed-tab.html on how to remove carriage return, line feed and tab from a string in TSQL.   The snippet below will substitute these characters with a space and grab only the first 100 characters.

LEFT(REPLACE(REPLACE(REPLACE([YOUR_STRING], CHAR(10), ' '), CHAR(13), ' '), CHAR(9), ' '), 100)

About AussieBICG

Connect with me here https://au.linkedin.com/in/aussiebicg

1 Response

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s