Use AND, not OR (see correction inside)
In other words NOT (Field LIKE 'Value1' OR field LIKE 'Value2')
Is the same as
NOT Field like 'Value1' AND not field like 'Value2'
>I have a query that I am trying to run, but it is returning incorrect results.. My table has values as follows
>
>
>lname
>=====
>person1
>person2
>BADGE/332
>BADGE/331
>person3
>person4
>VACANT/333
>etc...
>
>
>
>when I run the following query:
>
>
>SELECT Employee.e_lname, Employee.e_fname, Employee.e_mi, Employee.e_dob,;
> Employee.e_phq, Employee.e_unit, Employee.e_class, Employee.e_flg13,;
> Employee.e_flg14, Employee.e_flg15, Employee.e_flg16,;
> Employee.e_empstatus, Employee.e_id, Employee.e_flg2, Employee.e_pic;
> FROM ;
> employee;
> WHERE Employee.e_lname NOT LIKE ( "%BADGE%" );
> AND Employee.e_lname NOT LIKE ( "%VACANT%" )
>
>
>I still keep getting all the records that are like BADGE and VACANT. How do I exclude these?
>
>thanks
>nick
If it's not broken, fix it until it is.
My Blog