Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SCRIPT TO ADD DATA TO TBL 1 FROM TBL 2 WHERE. . . 1

Status
Not open for further replies.

awise

IS-IT--Management
Dec 11, 2001
85
I need help with a script to add data (update) table 1 from table 2 where field 1 in table 1 = field 1 in table 2.

The records in table 2 already exist in table 1, I just want to add values from specified fields in table 2 to same specified fields in table 1.

Appreciate any assistance,

zaw

 
Generically, here is how this is done.

Code:
Update Table1
Set    Table1.Field = Table2.Field
From   Table1
       Inner Join Table2 
         On Table1.SomeField = Table2.SomeField

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top