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

Insert data into two joined tables

Status
Not open for further replies.

nina1

Programmer
Aug 14, 2001
31
CA
Hello!

I have two tables joined by PartSupID, the first table(Part) contains all info about the product Part#,supplierID,Name, currency etc and PartSupID (combination of Part# and supplier ID) as a primary key.
The second table(Price) contains the price information like POPrice, contract#, effective date. The tables are joind by PartSupId (foreign key in Price).
I want to create an append query to add new parts with the data for both tables.
Also I want to update the existing part # with new prices.
Can someone please give me some guidelines how to do this?
Part table: Price Table:
Part# PartSupID
partsupID Price
suppID Contract#
name EffectiveDate
currency
Relationship between tables is one to many!
Thanks a lot!

 
It is not possible to add records to two separate tables with a single insert, so if you wanted to add records to each table, you would need to carry out two separate insert operations.
Likewise, an update query can only update one table, so issuing multiple updates will be necessary for changing data in both tables.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top