Camillia
asked on
Another way of coding this where-clause
I have this where clause that i needed to modify. I want to exlcude
any values 050102xxxx (the first 6 values start with 050102).
I did it by adding an "and" clause. You can see this value is in the OR clause already. Can I exlcude in the OR clause?
any values 050102xxxx (the first 6 values start with 050102).
I did it by adding an "and" clause. You can see this value is in the OR clause already. Can I exlcude in the OR clause?
where ( m.loc_id LIKE '2001%'
OR m.loc_id LIKE '2002%'
OR m.loc_id LIKE '2003%'
OR m.loc_id LIKE '1001%'
OR m.loc_id LIKE '1003%'
OR m.Loc_ID LIKE '1002%'
OR m.loc_id BETWEEN '0008000000' AND '0171999999'
[b]OR m.Loc_ID BETWEEN '0501000000' AND '0501999999' [/b]
) [b]and m.loc_id not like '050102%'[/b]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Should be fine