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 |
cardgunner
326 Posts |
Posted - 2007-06-14 : 08:55:46
|
I read some bol on this as well as searched the forum however i just want to clarify when using the following select replaceselect replace (cust.add1, 'p.o.','PO')from custwhere cust.id='20'I'm not permanetly replacing p.o. in the table?So if I needed to join to tables on table having p.o. on the other table po i could use this WITHOUT permanetly changing a table's content.In order to do this I would have to mingle in an Update clause as well?Card Gunner |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-06-14 : 09:01:45
|
Yupps!SELECT is only for display purpose. If you want to change column values, you will have to use UPDATE.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
PeterNeo
Constraint Violating Yak Guru
357 Posts |
Posted - 2007-06-14 : 09:03:12
|
Replace will not modify the data in the table. If u want to join 2 tables thenu can use like thisSelect t1.id, t2.idFrom @t t1Inner join @t2 t2 on t1.add1 = replace (t2.add1, 'p.o', 'PO') |
|
|
cardgunner
326 Posts |
Posted - 2007-06-14 : 10:58:11
|
Thanks. I'm just a little nervous and gunshy. I could feel the reprecusions if I did change it, permanetly.Card Gunner |
|
|
|
|
|