Subject RE: [ib-support] Calling all SQL Gurus...
Author Thomas Steinmaurer
Hi Martijn,

> Hi,
>
> > just a thought, but can H.SALESAMT have NULL values?
> >
> > Have you tried to run the query without:
> >
> > HAVING
> > SUM ( H.SALESAMT ) <> 0
> >
> > I'm not sure, but SUM (H.SALESAMT) might return NULL if
> > one of the H.SALESAMT values is NULL.
>
> Event if it was - there's a difference between a (or more) records
> with NULL compared to no records at all :)

LOL! It's time to get more sleep the next weeks ;-).

Regards,
Thomas Steinmaurer
IB LogManager 2.0 - The Logging/Auditing Tool for InterBase and Firebird
http://www.iblogmanager.com