Alex Thomas
Ten Centuries
Points: 1120
More actions
June 6, 2005 at 11:01 am
#66134
er a pretty simple this one for you guys.. i want to add records to a table from another where they don't exists based on 2 fields..
tables a and b both have fields sho and evi where sho and evi form the primary key for both.
thus i want to update b with a but not where records of table a exist in table b.
cheers in advance!
Ninja's_RGR'us
SSC Guru
Points: 294069
June 6, 2005 at 11:23 am
#563290
Insert into b (sho, evi, col1, col2)
Select sho, evi, col1, col2 from dbo.a A where not exits (Select * from dbo.B B where A.sho = B.sho and A.evi = B.evi)
June 6, 2005 at 11:28 am
#563292
i can always rely on you remi ;-)))
June 6, 2005 at 11:29 am
#563293
If only that were true...
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply