Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Replace/Delete new line char in string
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

31 Posts

Posted - 11/09/2012 :  16:04:52  Show Profile  Reply with Quote

I'm trying to replace newline char in my result varchar(7980), I don't have option to create any functions, can anybody help with the right string replace that I can on the fly, I'm bit new to mssql.

It wont hurt if I can do this for all non prints chars.


Edited by - dainova on 11/09/2012 16:05:45

Flowing Fount of Yak Knowledge

5155 Posts

Posted - 11/10/2012 :  08:04:36  Show Profile  Reply with Quote
Assuming result is in a column named resultCol, use the following REPLACE snippet
SELECT REPLACE(REPLACE(resultCol,CHAR(10),''),CHAR(13),'')
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000