Arrrrrrrrrrrrr
Posted in 1999
Topics: General Discussion
I've been working on this for hours, can anyone explain why this doesn't
work:
select payroll_num from person_load
where payroll_num not in
(select payroll_num from personnel)
I have a unique payroll_num in the person_load table that doesn't appear in
the personnel table, but the query never returns any data. I am used to
using oracle, and this would work first time using this. Is there any
difference between the statements in oracle and informix that is confusing
me here?
cheers
Steve
Hi Steve,
it seems ok. Maybe a little trick helps:
select payroll_num from person_load
where payroll_num is not null
andpayroll_num not in
(select payroll_num from personnel)
I cannot explain it, but sometimes there are problems
with NULL values
HTH
Reinhard
Steve Peake <puppet@dial.pipex.com> schrieb in im Newsbeitrag:
828nd7$2h9pu$1@fu-berlin.de...
> I've been working on this for hours, can anyone explain why this
doesn't
> work:
>
> select payroll_num from person_load
> where payroll_num not in
> (select payroll_num from personnel)>
> I have a unique payroll_num in the person_load table that doesn't
appear in
> the personnel table, but the query never returns any data. I am
used to
> using oracle, and this would work first time using this. Is there
any
> difference between the statements in oracle and informix that is
confusing
> me here?
>
> cheers
>
> Steve
>
>
looks like it should work to me. Why not try a different approach?
Steve Peake wrote:
> I've been working on this for hours, can anyone explain why this doesn't
> work:
>
> select payroll_num from person_load
> where payroll_num not in
> (select payroll_num from personnel)>
> I have a unique payroll_num in the person_load table that doesn't appear in
> the personnel table, but the query never returns any data. I am used to
> using oracle, and this would work first time using this. Is there any
> difference between the statements in oracle and informix that is confusing
> me here?
>
> cheers
>
> Steve
Steve - Would you be willing to let us know what "doesn't work" means? Then we
could help you.
Rich
Steve Peake wrote:
> I've been working on this for hours, can anyone explain why this doesn't
> work:
>
> select payroll_num from person_load
> where payroll_num not in
> (select payroll_num from personnel)>
> I have a unique payroll_num in the person_load table that doesn't appear in
> the personnel table, but the query never returns any data. I am used to
> using oracle, and this would work first time using this. Is there any
> difference between the statements in oracle and informix that is confusing
> me here?
>
> cheers
>
> Steve
--
Richard C. Auslander
Database Manager
AirFlash, Inc.
1733 Woodside Rd., Suite #110
Redwood City, CA 94061
(650) 556-7928
www.airflash.com