Kevin L writes:
> 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);
Are there any NULL values in workorder.emp_id? If so, you need to exclude
them (... FROM workorder WHERE emp_id IS NOT NULL).
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/