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 |
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2012-11-16 : 08:34:31
|
I have users table in that lot of records in that one i need to update only FirstName,Lastname,MiddleName in that from another table i have 600000 records in one table and 580000 records in another table.i have to update only 580000 records in users table??How to write query for this >???P.V.P.MOhan |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-11-16 : 09:43:33
|
UPDATE tgtSET FirstName =src.FirstName,MiddleName = src.MiddleName,lastname = src.lastNameFROM TargetTable tgtINNER JOIN SourceTable src ON <whatever the link is between the tables>JimEveryday I learn something that somebody else already knew |
|
|
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2012-11-16 : 09:45:21
|
THanks JimF it worked for meP.V.P.MOhan |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2012-11-16 : 10:21:25
|
You're Welcome.JimEveryday I learn something that somebody else already knew |
|
|
|
|
|