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.
| Author |
Topic |
|
pranesh
Starting Member
2 Posts |
Posted - 2005-08-16 : 17:24:08
|
| Hi,I need to update all "data" in an existing column with "Prefix+data".How can I do that?Any help is much appreciated.Thank you.PeterAlberta, Canada |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-08-16 : 17:25:32
|
update <yourtable>set <yourColummn> = <prefix> + <data>where <yourColummn> = <data>Corey Co-worker on The Wizard of Oz "...those three midgets that came out and danced, the freaked me out when I was little. But they are ok now." |
 |
|
|
pranesh
Starting Member
2 Posts |
Posted - 2005-08-16 : 17:50:47
|
| Thank you so much,Seventhnight for your lightening prompt response. It worked perfectly.best regards,Pranesh |
 |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2005-08-16 : 19:02:25
|
just a note, before you do updates like that you should make sure you have a backup.sometimes I just create a copy of the table just to be safe. something like this works:select *into tablename_cyafrom tablename -ec |
 |
|
|
|
|
|