There is missing a , sign ???

S

SpookiePower

I'm about to transfer some data from on table
to another. Here is my SQL

INSERT INTO table1 (a, b)
SELECT (a, b)
from table2

I keep getting an error that says that there
is missing a "," sign. But where ??
 
J

John Spencer

Parentheses confusion. (zero to many records depending on the number of
records in table2)
INSERT INTO table1 (a, b)
SELECT a, b
FROM table2

Or syntax confusion (One new record)
INSERT INTO table1 (a, b)
Values ("a", "b")

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
A

Albert D. Kallal

SpookiePower said:
I'm about to transfer some data from on table
to another. Here is my SQL

INSERT INTO table1 (a, b)
SELECT (a, b)
from table2

I keep getting an error that says that there
is missing a "," sign. But where ??

Not the best error message..is it?

You should not include parenthesis in the select part...

select a, b from table2...

select (a + 5) from table 2......

You can see how the parenthesis are trying to create (a, B) into some kind
of expression and it's confusing the whole thing. Try without the () for the
select...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top