I think the critical factor is the GROUP BY clause together with the HAVING.  It is 
not looking for a single data row, but a result from evaluating the group.  SUM
provides a result based on analyzing a group, as does MAX.

        Randy Peterson

MJS wrote:

> Looks like you have to have a function, even if it's arbitrary, to make it work.  
>Anybody else know anything different?
>
> Albert Berry wrote:
>
> > I ran this command against our live system, and received back the
> >
> > -WARNING- No rows exist or satisfy the specified clause.
> >
> > message (thank heaven! They had better match!)
> >
> > SELECT t1.SONO,MAX(t1.INV_AMT),SUM(t2.TSALE$) +
> >   FROM SaleOrdr t1, SaleTran t2 +
> >   WHERE t1.SONO = t2.SONO +
> >   GROUP BY t1.SONO +
> >   HAVING MAX(t1.INV_AMT) <> SUM(t2.TSALE$)
> >
> > MJS <[EMAIL PROTECTED]> wrote:
> >
> > >I did, same error.  I don't think I have a corrupt database, but I may have to
> > >create a mini database to track this down.  Can you write and test a 1 line
> > >command that you know works on one of your data bases and email it to me?
> > >
> > >TIA!
> > >
> >
> > __________________________________________________________________
> > Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
>convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
> >
> > Get your own FREE, personal Netscape Mail account today at 
>http://webmail.netscape.com/

Reply via email to