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

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

dainova
Starting Member

31 Posts

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

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.

Thx
Trent

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

sunitabeck
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  
 New 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.08 seconds. Powered By: Snitz Forums 2000