Subject RE: [firebird-support] Re: Things that works in version 1.5 and dont works in 2.0
Author Rick Debay
A workaround would be to have the CASE in the SELECT portion of the
statement, and then the ordinal of CASE in the GROUP.
That's how we do it, but then we want to get back the value in the CASE
and are not just doing it to group the items.

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Marco Castroo
Sent: Tuesday, November 28, 2006 2:48 PM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Things that works in version 1.5 and
dont works in 2.0

Dmitry,

The problem is not related to the aliases. The problem is in the CASE
item. If I takes if off the Group clause, the query works, but it is
very necessary in may query.

Thanks,

Marco Castro

--- In firebird-support@yahoogroups.com, Dmitry Yemanov <dimitr@...>
wrote:
>
> Marco Castroo wrote:
> >
> > In FireBird 1.5 I have a query with a group like this
> >
> > ...
> > Group by ae.Author, l.Book, Price,
> > case
> > When op.StockChange in (23,24) Then 21
> > When op.StockChange in (43,44) Then 22
> > Else Mode end
> > ...
>
> Could you please show us the entire query? Could "Price" or "Mode"
be
> column aliases for any aggregate functions used in the select list?
>
>
> Dmitry
>




++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Resources item on the
main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Yahoo! Groups Links