Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi,I have a text (data type) column, which has got ENTER character. How to replace this valus using t-sql?Thank you.------------------------I think, therefore I am
nr
SQLTeam MVY
12543 Posts
Posted - 2005-02-03 : 09:56:53
seehttp://www.mindsdoor.net/SQLTsql/ReplaceText.html==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy.
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts
Posted - 2005-02-03 : 10:36:43
Misread! Didn't notice the 'text' datatypeTry this:
declare @myTable table (myText varchar(100))Insert Into @myTableSelect 'abcdef'Union Select '123456'Select *, replace(myText,char(13)+char(10),'') From @myTable--orSelect *, replace(replace(myText,char(13),''),char(10),'') From @myTable
Corey"If the only tool you have is a hammer, the whole world looks like a nail." - Mark Twain
ravilobo
Master Smack Fu Yak Hacker
1184 Posts
Posted - 2005-02-04 : 01:05:37
Thank you.------------------------I think, therefore I am