On 24 Apr 2002, tony wrote:
> On Wed, 2002-04-24 at 17:55, ARP wrote:
> > > I guess select count(*) from individu where type2 is null will return 5717 (18417-12619-81)
> >
> > >Still don't understand the logic - I just want cells that don't start
> > >with "a" I don't care if they contain null values or not.
>
> > select count(*) from individu where type2 is null or type2 not like 'a%'
>
> "or" works here but not in some of the more complex joins I am doing
> elsewhere. I will be using "-" and "0" a lot more from now on!
>
I don't understand what you're saying now can we just restate the situation.
You have:
Query Giving
-------- ----------
SELECT count(*) from individu T
SELECT count(*) from individu WHERE type2 like 'a%' x
SELECT count(*) from individu WHERE type2 not like 'a%' y
where x + y != T
and, here is where I get uncertain:
SELECT count(*) from individu WHERE type2 like 'ar%' v
SELECT count(*) from individu WHERE type2 not like 'ar%' w
where v + w == T
But in another message you imply that you did have nulls present, so was your
'two letter' test incorrectly stated or was it that you weren't aware that
NULLs existed? (Only asking because although I can't see it happening if there
weren't any NULLs there must be a bug)
--
Nigel J. Andrews
Director
---
Logictree Systems Limited
Computer Consultants