Hi.
here's my scenario: table employee has emp_id and employee
details. table salesorder has emp_id and sales details.
The following works fine: (get all employees who have sold
something)
SELECT emp_id FROM employee WHERE emp_id IN (SELECT emp_id FROM
salesorder);
However, getting employees who have NOT sold something always
returns zero rows:
SELECT emp_id FROM employee WHERE emp_id NOT IN (SELECT emp_id
FROM workorder);
Has anyone encountered this before? I know the second query
should return something because the data is in the table.
thanks!
-Kevin
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text