Subject | RE: [firebird-support] SQL NOT IN |
---|---|
Author | Dion |
Post date | 2005-11-23T03:24:56Z |
I tried your suggestion, Alexandre, and the records I am looking for are
returned, although the EXISTS script(like the IN) also returns an empty
result set.
Thanks.
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: 22 November 2005 04:22 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] SQL NOT IN
Dion wrote:
The above query lookslike ok !
try this one to check
select
A.forkliftcell
from
fetchedhrs A left join
forklift B on (B.forkliftcell = A.forkliftcell)
where
B.forkliftcell is null
if it returns an empty result set you have a full relation of the too tables
(i.e. no
fetchedhrs without forklift)
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_____
YAHOO! GROUPS LINKS
* Visit your group "firebird-support
<http://groups.yahoo.com/group/firebird-support> " on the web.
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
_____
[Non-text portions of this message have been removed]
returned, although the EXISTS script(like the IN) also returns an empty
result set.
Thanks.
_____
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Alexandre Benson
Smith
Sent: 22 November 2005 04:22 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] SQL NOT IN
Dion wrote:
>select fetchedhrs.forkliftcellis
>
> from fetchedhrs
>
> where fetchedhrs.forkliftcell not in
>
> (select forklift.forkliftcell from forklift)
>
>
>
>Hi,
>
>
>
> I want all forklifts for which I have records in the FetchedHrs table but
>no corresponding record in the Forklift table. I thought that the above sql
>would work, but I get an empty resultant dataset. I am certain that there
>at least one record in the FetchedHrs table which is not in the ForkliftHi Dion,
>table.
>
>
>
>Is there an issue with this in FB v1.5.2.4731?
>
>
>
>Thanks,
>
>Dion.
>
>
>
The above query lookslike ok !
try this one to check
select
A.forkliftcell
from
fetchedhrs A left join
forklift B on (B.forkliftcell = A.forkliftcell)
where
B.forkliftcell is null
if it returns an empty result set you have a full relation of the too tables
(i.e. no
fetchedhrs without forklift)
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
_____
YAHOO! GROUPS LINKS
* Visit your group "firebird-support
<http://groups.yahoo.com/group/firebird-support> " on the web.
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
* Your use of Yahoo! Groups is subject to the Yahoo!
<http://docs.yahoo.com/info/terms/> Terms of Service.
_____
[Non-text portions of this message have been removed]