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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Replace/Delete new line char in string

Author  Topic 

dainova
Starting Member

31 Posts

Posted - 2012-11-09 : 16:04:52
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

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-11-10 : 08:04:36
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
   

- Advertisement -