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 |
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2012-04-02 : 00:54:23
|
Hi All,I have 2 tables Tab1 and Tab2 I need to update Tab1 columnA from Tab2 columnA for each row in the first table.Pls help |
|
gangadhara.ms
Aged Yak Warrior
549 Posts |
Posted - 2012-04-02 : 00:58:41
|
Note: Need to update only records which are having a different in value. |
 |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2012-04-02 : 11:34:52
|
Please provide some sample data.Also tell, how the 2 tables are relatedSrinika |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2012-04-02 : 12:36:20
|
UPDATE t1SET t1.Col2 = t2.ColXFROM dbo.Table1 AS t2INNER JOIN dbo.Table2 AS t2 ON t2.ColGreen = t1.ColWarmWHERE t1.Col2 <> t2.ColX N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|