problem with subselect: NOT IN
От | Kevin L |
---|---|
Тема | problem with subselect: NOT IN |
Дата | |
Msg-id | 20010402191045.38794.qmail@web9601.mail.yahoo.com обсуждение исходный текст |
Ответы |
Re: problem with subselect: NOT IN
Re: problem with subselect: NOT IN Re: problem with subselect: NOT IN |
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: