Subject | Re: [firebird-support] ORDER BY in Interbase vs Firebird |
---|---|
Author | Woody |
Post date | 2007-12-10T19:43:07Z |
mthendley wrote:
result? Of what use could it be?
Woody (TMW)
> Interbase allowed the following query:Why would you want to order by a calculation that only returns one
> SELECT SUM(ind_MoneyCollected)
> FROM ProductQty PQ RIGHT JOIN
> (InvoiceMaster IM JOIN InvoiceDetail ID ON ID.InvoiceMaster_ID =
> IM.InvoiceMaster_ID AND ID.ind_Status <> 2 AND
> IM.inm_TimeOut >=
> :BeginDate AND IM.inm_TimeOut < :EndDate)
> ON ID.ProductQty_ID = PQ.ProductQty_ID
> JOIN Product P ON PQ.Product_ID = P.Product_ID
> WHERE P.ProductLine_ID = 11
> ORDER BY InvoiceMaster_ID
>
> Firebird does not allow this because InvoiceMaster_ID is not in either
> select list or aggregate function. But I do not want it in my select
> list because I cannot have it in my GROUP BY clause. Any suggestions
> to make this work with Firebird?
> Thanks
>
result? Of what use could it be?
Woody (TMW)