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 |
murd
Starting Member
24 Posts |
Posted - 2012-12-03 : 15:08:00
|
I need to update/change values to a column w/ a specific range from a different table. exampletable1 table 2CID DID1 1002 2003 3004 4005 5006 600I want to update CID from <=4 to the corresponding DID ResultsCID100200300400hope I explained this right...thx |
|
shilpash
Posting Yak Master
103 Posts |
Posted - 2012-12-03 : 16:46:08
|
so do you want your final output look like these--CID DID100 100200 200300 300400 4005 5006 600 |
|
|
shilpash
Posting Yak Master
103 Posts |
Posted - 2012-12-03 : 16:52:44
|
If so,use this---UPDATE tablename SET cid = did FROM tablename WHERE cid <= 4 |
|
|
murd
Starting Member
24 Posts |
Posted - 2012-12-04 : 00:07:57
|
yes!! thanks ill try this |
|
|
|
|
|