VBA SQL Terms

  • Thread starter Thread starter James
  • Start date Start date
J

James

Is IN a valid vba SQL term?

Like:

Select * From table Where field IN a, b, c;
 
Strictly speaking, there is no such thing as 'VBA SQL'. It is the database
engine (JET if you are using an MDB) that interprets the SQL command. To
VBA, it's just another string.

That said, IN is a valid (JET) SQL term, you're just missing the parentheses
around the value list and the quotes around the string values ...

SELECT * FROM TableName WHERE FieldName IN ('a', 'b', 'c')

See 'IN Operator' in the help files for more information.
 
thanks.
Brendan said:
Strictly speaking, there is no such thing as 'VBA SQL'. It is the database
engine (JET if you are using an MDB) that interprets the SQL command. To
VBA, it's just another string.

That said, IN is a valid (JET) SQL term, you're just missing the parentheses
around the value list and the quotes around the string values ...

SELECT * FROM TableName WHERE FieldName IN ('a', 'b', 'c')

See 'IN Operator' in the help files for more information.
 

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

Back
Top