|
-
Mar 21st, 2001, 02:47 PM
#1
Thread Starter
Junior Member
I am using this sql statement and it does not put any values into the orders table. Any ideas?
strq = "INSERT INTO Orders(OFirstName, OLastName, OAddress1, OAddress2) " _
& "SELECT Customers.FirstName, Customers.LastName, Customers.Address1, Customers.Address2 " _
& "FROM Customers, Orders WHERE Customers.CustomerID=Orders.CustomerID"
I was using the sql statement and I got the error message:
Syntax error. in query expression 'Select Customers.FirstName'
strq = "Insert Into Orders(OFirstName, OLastName, OAddress1, oAddress2) Values " &_
"(Select Customers.FirstName,Customers.LastName, Customers.Address1, Customers.Address2 " &_
"from Customers, Orders WHERE Customers.CustomerID=Orders.CustomerID)"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|