There is missing a , sign ???

  • Thread starter Thread starter SpookiePower
  • Start date Start date
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 ??
 
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
 
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...
 
Back
Top