Showing posts with label manipulation. Show all posts
Showing posts with label manipulation. Show all posts

Tuesday, February 14, 2012

Character find and replace

Hi Folks,

I'm trying some character manipulation in SQL Server 2000.

Say we have a table data with a field data_text. In the data_text field we have data like

"How`s you then"

Can anyone let me now how I can update this text field so I can replace the ` with a ' SET data_text = REPLACE(data_text,'`','''')

The last argument is 4 (four) consecutive single quotes, with no spaces. In general, when you want to specify a single quote in a string, use two quotes.