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

syntax error need help 1

Status
Not open for further replies.

ck1999

Technical User
Dec 2, 2004
784
US
I have the following sql code that is creating an error

"insert into Syntax error"

strsql = "INSERT INTO tblorderentry(confirmationnum, date, customername, qty, productname, size, requestedshipdate," _
& " ordercalledinby,orderreceivedby,shippingcompany,shippingpayment,customerpo)" _
& " SELECT tblorderinfo.confirmationnum, tblorderinfo.orderdate, customers.customer_name, tblorder.qty, tblorder.product,tblorder.size," _
& " tblorderinfo.shipdate, tblorderinfo.calledinby, tblorderinfo.ordertakenby, customers.shipper, customers.freight,tblorderinfo.ponum" _
& " FROM (tblorder inner join customers on tblorder.customer = customers.customer_name)" _
& " inner join tblorderinfo on customers.customer_name = tblorderinfo.customer_name;"




Any help would be appreciated.

Chris
 
Any other details on the error message returned? I would suggest checking the data types of the fields you're inserting into against the data types of the fields you're selecting from, to ensure that they match up.
 
Also, you may want to change the name of your "date" field in the tblorderentry table...Date is a reserved word.
 
rjoubert
The error message was sent from err.description in an error handler and did not say anything else.

However, The problem was the Date field. I have fixed that. Thanks alot. I have spent about an hours going over this 1 line of code and could not figure it out.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top