• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1702
  • Last Modified:

Remove hidden characters in a column SQL SERVER

How do you remove hidden characters like a carriage return or any other unknown characters from columns?  
0
JulieGrace
Asked:
JulieGrace
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
each character has an ascii code, like carriage return and line feed have char(10) and char(13).
so, simply do

UPDATE yourtable
  SET yourcol = REPLACE(REPLACE(yourcol, char(13), ''), char(10), '')
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now