viking79 Posted February 9, 2012 Share Posted February 9, 2012 Hi,I want the report I'm working on to bring back info based on where an id equals either 1,2,or 11When I put all three in the query, I get errors, Any suggestions? Thanks Link to comment Share on other sites More sharing options...
cbarlow3 Posted February 9, 2012 Share Posted February 9, 2012 Can you post your SQL query? Can you post the error? I don't even know the data type of ID or what syntax you used in your WHERE clause, but if I assume for the moment that id is an integer data type, I would think either of the following would work:SELECT id, field2, field3FROM recordNameWHERE id=1 OR id=2 OR id=11 orSELECT id, field2, field3FROM recordNameWHERE id IN (1, 2, 11)Hope that helps.Carl Link to comment Share on other sites More sharing options...
viking79 Posted February 9, 2012 Author Share Posted February 9, 2012 Thanks for your help, it happened to be an interger data type so the second one worked out just fine. Thanks again :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now