Subject Re: [ib-support] Re: Converting from MSSQL
Author Claudio Valderrama C.
""didiergm"" <Didiergm@...> wrote in message
news:a5igf2+rpag@......
> Georges,
>
> This does not work, FB 'pretends' he never heard of monthtransactiondate
>
> :(
>
> --- In ib-support@y..., "Boutwell, George" <gboutwel@v...> wrote:
> > I'm not positive it would work, but you could try:
> >
> > select extract(month from sales_transaction.transaction_date) as
> monthtransactiondate, count(*)
> > from sales_transaction
> > Group By monthtransactiondate

It doesn't work because neither IB nor FB recognize column names as true
aliases. This is why I showed how to do the trick with a view.

create view st(e) as
select extract(month from transaction_date) from sales_transaction;

select e, count(*)
from st
group by e;

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing