By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

Syntax help

P: 8
Good Day,

I have a table that is labeled temp order_tbl.
I understand that sql reads the space so the correct way to get around the space is to use brackets: SELECT [temp order_tbl] which seems to work fine until I try the INSERT INTO function:

INSERT INTO temp order_tbl this gives me a syntax error

INSERT INTO [temp order_tbl] this gives me invalid use of brackets

any ideas?

Thanx
Farris
Oct 21 '06 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
The correct syntax is (using date1 and CustName as sample fields):

INSERT INTO [temp order_tbl] ( date1, CustName ) SELECT #11/05/2006# AS Expr1, "John Doe" AS Expr2;

OR

INSERT INTO [temp order_tbl] ( date1, CustName ) VALUES (#11/05/2006#, "John Doe");
Oct 21 '06 #2

P: 8
The correct syntax is (using date1 and CustName as sample fields):

INSERT INTO [temp order_tbl] ( date1, CustName ) SELECT #11/05/2006# AS Expr1, "John Doe" AS Expr2;

OR

INSERT INTO [temp order_tbl] ( date1, CustName ) VALUES (#11/05/2006#, "John Doe");


Thanx!!!!!
I understand now
Farris
Oct 22 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.