Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select statement returns incorrect results
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Select statement returns incorrect results
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01456688
Message ID:
01456688
Views:
79
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%" );
   OR   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
Next
Reply
Map
View

Click here to load this message in the networking platform