[thelist] Won't return results for 0 matches
rudy limeback
r937 at interlog.com
Thu Jul 20 07:24:32 CDT 2000
>> select count(pick) as cnt, ticket
>> from archivepicks
>> where pick IN (11, 24, 29, 41, 49, 52)
>> group by ticket
>> having count(pick) = 0";
>
>Since your condition eliminates null values of pick: If count(pick) is
>0, then by definition, there are no records to be sent back. IOW, count
>adds 1 for each row with a not-null value of pick so if pick is not in
>11, 24, 29, 41, 49, 52, you won't get any rows.
hey chris
sorry for the delay
i think adam nailed it, you are getting nothing back because that's what
you asked for
still, i am somewhat troubled, bercause you said "I have physically
verified that there are a few entries that have 0 matches in them"
this sounds awfully like an outer join, and yet it appears you are
selecting from a single table (unless archivepicks is actually a view
<grin>)
if you're still having trouble, shoot me a sample data set and tell me what
results you wanted...
rudy.limeback
r937.com
evolt.org
More information about the thelist
mailing list