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

Need to update two tables from one

Status
Not open for further replies.

elentz

Technical User
Jan 9, 2007
81
US
I have two tables that have a relationship ie: common id number. I have a third table that has some information that I need to get into the other two tables. here's the setup

Table 1
id number
part number
description

Table 2
link id number
prefix
cost

Table 3
part number
prefix
cost

The link id number and the id number is the relationship between table 1 and table 2. I need to update the fields in table 2 with the info from table 3, the key factor is that I need to match the part number in both tables 1 & 3 to get the right info into table 2.

Can someone show me how to do this?

Thank you very much
 
the mysql docs have several examples for updating one table based on joining it to one or more other tables

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top