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

Statement gives error

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
0
0
PH
Whats wrong with my sql statement?

SELECT * FROM features WHERE oID=13, 16, 20, 21, 22


Microsoft JET Database Engine error '80040e14'
Syntax error (comma) in query expression 'oID=13, 16, 20, 21, 22'.
/duck/show.asp, line 40
 
If you want to return the record where oID is one of the values listed then you need to use:

SELECT * FROM features WHERE oID IN (13, 16, 20, 21, 22)

Regards,




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top