Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sybase/Sql server Outer Joins, nulls, and counts
dba_222_at_yahoo.com wrote:
> Good one! Thanks guys!
>
> WHERE e.unique_id is NULL
> 133295
>
>
> WHERE e.unique_id is NOT NULL
> 170695
>
>
> This looks much better.
> Now they both add up to the count with no WHERE clause at all.
>
>
> If only the SQL compiler would catch the bad syntax. :(
>
>
It does; you didn't have any 'bad syntax'. What the SQL engine won't do is correct for poor logic, which you did have.
David Fitzjarrell Received on Tue Oct 24 2006 - 16:19:22 CDT