G
Glenn
Michel,
Thank you for your reply. However I don't think your
solution is the one I am looking for. I may not have
described the scenario correctly. I have two tables;
Customers and Customer_Address. The tables are in a one
to many relationship; Customers.CustomerID(PK) and
Customer_Address.Customer(FK). Say for example, I have a
*.csv file containing new customer name etc details to be
inserted into Customers table and details of that
customer's address to be inserted into Customer_Address
table. I understand I can JOIN two INSERT statements but
I don't know the syntax. Any clearer??
Reading what I can, I thought it might go something like
this,
but this hasn't worked
INSERT INTO Customers INNER JOIN Customers_Address ON
Customers.UniqueID = Customers_Address.CustomerID
(Customers.LastName, Customers.FirstName,
Customers_Address.Address, Customers_Address.City,
Customers_Address.State,) VALUES 'SMITH','Bill',
'1 Main Street','Maintown', 'Mainstate');
Thanks again
Glenn
Thank you for your reply. However I don't think your
solution is the one I am looking for. I may not have
described the scenario correctly. I have two tables;
Customers and Customer_Address. The tables are in a one
to many relationship; Customers.CustomerID(PK) and
Customer_Address.Customer(FK). Say for example, I have a
*.csv file containing new customer name etc details to be
inserted into Customers table and details of that
customer's address to be inserted into Customer_Address
table. I understand I can JOIN two INSERT statements but
I don't know the syntax. Any clearer??
Reading what I can, I thought it might go something like
this,
but this hasn't worked
INSERT INTO Customers INNER JOIN Customers_Address ON
Customers.UniqueID = Customers_Address.CustomerID
(Customers.LastName, Customers.FirstName,
Customers_Address.Address, Customers_Address.City,
Customers_Address.State,) VALUES 'SMITH','Bill',
'1 Main Street','Maintown', 'Mainstate');
Thanks again
Glenn