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
 Replacing characters?

Author  Topic 

xrum
Yak Posting Veteran

87 Posts

Posted - 2010-10-01 : 11:24:47
hi,

i have a table that has values in quotes.

for example:

"test" , "test2" etc.

is there a query i can run to remove the double quotes from my fields?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-01 : 11:29:56
[code]
update your_table
set your_column=replace(your_column,'"','')
where your_column like '%"%'
[/code]


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-10-05 : 06:44:15
quote:
Originally posted by webfred


update your_table
set your_column=replace(your_column,'"','')
where your_column like '%"%'



No, you're never too old to Yak'n'Roll if you're too young to die.


It is fine without where clause too

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-10-05 : 07:34:21
quote:
Originally posted by madhivanan

quote:
Originally posted by webfred


update your_table
set your_column=replace(your_column,'"','')
where your_column like '%"%'



No, you're never too old to Yak'n'Roll if you're too young to die.


It is fine without where clause too

Madhivanan

Failing to plan is Planning to fail


I should only update columns where exists a double quote.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -