Jump to content

multiple and or conditions


Recommended Posts

i am new to SQL and can't figure out how to do the following:


"SELECT * FROM 49866.csv WHERE

SQLDATE BETWEEN '2014-03-01' AND '2014-05-01'

AND TYPE = 'xx' OR TYPE = '2'

AND LOT = 'xx' OR LOT = '1.1' OR LOT = 'BO'"


I've tried:


"SELECT * FROM 49866.csv WHERE (SQLDATE BETWEEN '2014-03-01' AND '2014-05-01') AND (TYPE = 'xx' OR TYPE = '2') AND (LOT = 'xx' OR LOT = '1.1' OR LOT = 'BO')"


But it's not working. I assume I have the parentheses in the wrong spots. Any help would be much appreciated.



Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...