Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Carriage Returns During Transformation

Status
Not open for further replies.

mns117

Programmer
Apr 8, 2002
32
US
I'm setting up a DTS where I'm using a SQL query as my data source. In the query I'm doing a bit of data manipulation for example...

Im converting some dates using CONVERT()
Im using CAST() for a few of the fields.

I want to know if theres a similar method that I can use to strip carriage returns and replace them with a ", "

I've tried using replace(field,char(10),", ") AS Field, but I get an error!

Thank you so so much to whoever can help me with this one!
 
Is it a carriage return that you are trying to replace? I thought that was Char(13). Char(10) I believe is a line feed. Keep in mind that in some cases, a combination of both characters are used. You may have to do a replace on the replace (once for char(10), then again for char(13)).

Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top