Hi,
I have a query that is not working.
query => select * from products where a = '1' AND b = '2' AND c = '3' AND holespacing_decimal IN ('3.00','5.04') OR holespacing_decimal_two IN ('3.00','5.04') OR holespacing_decimal_three IN ('3.00','5.04')
The issue that I am having is that when I use OR's along with AND's everything before the OR's basically gets ignored in the query.
Is there a way to use multiple AND's and multiple OR's in a sql statement. I need to be able to create all of the first statements a = 1, b = 2, and c = 3 and then use the OR's to search these 3 holespacing columns...
Is this possible?
Thanks for you help!
Creating a query with AND'S and OR's
Moderator: General Moderators
-
waynobweno
- Forum Newbie
- Posts: 2
- Joined: Fri May 15, 2009 1:34 pm
Re: Creating a query with AND'S and OR's
Use parentheses.
Really. Why didn't you think of that?
Really. Why didn't you think of that?