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 |
|
Jsolomon
Starting Member
13 Posts |
Posted - 2010-11-29 : 10:00:19
|
| I have a tableA in DB1 with 58 columns and a tableA in a DB2 with 26 columns. I need to update a value in TableA DB1 based on compare of 5 columns from two tables.UPDATE F SET Validrecord=5FROM Florida_test FINNER JOIN lola_dnm.dbo.ddnc DPON (F.First and F.Last and F.address and F.city and F.State) = (DP.First and DP.Last and DP.street and DP.City and DP.ST)This does not work! and help? |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-11-29 : 10:05:28
|
| UPDATE F SET Validrecord=5FROM Florida_test FINNER JOIN lola_dnm.dbo.ddnc DPON F.First = DP.Firstand F.Last = DP.Lastand F.address = DP.streetand F.city = DP.Cityand F.State = DP.ST==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Jsolomon
Starting Member
13 Posts |
Posted - 2010-11-29 : 10:12:00
|
| Thanks works perfect!!Jeff |
 |
|
|
|
|
|