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
 wanna change part of the text of a column

Author  Topic 

kvishnuprasad
Starting Member

13 Posts

Posted - 2008-11-11 : 11:30:01
HI folks,
i have a table like this

ID Name marks
1 vish"nu 60
2 cris" 54
3 mita"yu 56
4 nu"hu 71

i should be able to modify the names with the correct format ie with out quotes ..

is there any replce command so that i can directly replace "
i want my table to be in this way..

ID Name marks
1 vishnu 60
2 cris 54
3 mitayu 56
4 nuhu 71

or

ID Name marks
1 vish@nu 60
2 cris@ 54
3 mita@yu 56
4 nu@hu 71

Please help me..

Regards,
Vishnu



darkdusky
Aged Yak Warrior

591 Posts

Posted - 2008-11-11 : 11:36:23
UPDATE TableName SET
ColumnName = REPLACE(ColumnName, '"','')
Go to Top of Page

Kumar_Anil
Yak Posting Veteran

68 Posts

Posted - 2008-11-11 : 18:34:18
UPDATE TableName SET
name = REPLACE(name, '"','@') ---This will replace " by @
Go to Top of Page

kvishnuprasad
Starting Member

13 Posts

Posted - 2008-11-12 : 01:57:33
Thank u, my frdz!!!!!
Go to Top of Page
   

- Advertisement -