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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update table with information from another 1

Status
Not open for further replies.

Freemo

MIS
Oct 25, 2005
71
GB
I wonder if anyone can help. I have 2 tables, table 1 and table 2. In table 1 i have the following columns:
TransactionId
Insurer
Net
Comms
In table 2 i have:
TransactionId
Fee
I have added a column named Fee to table 1 and would like to update it with the value from the Fee column in table 2 where the transactionid's match.

Can anyone help?

Many thanks
 
Code:
UPDATE Table1 SET Fee = Table2.Fee
FROM Table1
INNER JOIN Table2 ON Table1.TransactionId = Table2.TransactionId
not tested

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top