Subject Re: [firebird-support] order by column alias problem
Author Mark Gordon
That syntax does work... but the persistance layer that I am using
creates the SQL and it creates the order by using the alias for the column.

THis syntax should work:

select mstwid as warehouseCode, mstiid as itemCode order by warehouseCode

I have tried it out on several other DB and it works. I was hoping
there was a flag to turn on this functionality with firebird.

-Mark


Robert martin wrote:

> Hi
>
> Why not .....
>
> select mstwid as warehouseCode, mstiid as itemCode order by mstWid
>
> or
>
> select mstwid as warehouseCode, mstiid as itemCode order by 1
>
> These should not interfere with your persisant fields. Hope I
> understand your question / problem correctly :)
>
>
>
> Rob Martin
> Software Engineer
>
> phone +64 03 377 0495
> fax +64 03 377 0496
> web www.chreos.com
> Wild Software Ltd
> ----- Original Message -----
> From: Mark Gordon
> To: firebird-support@yahoogroups.com
> Sent: Monday, December 20, 2004 2:14 PM
> Subject: [firebird-support] order by column alias problem
>
>
> I just hit a huge road block and I am not sure what to do.
>
> This query works on all database except firebird:
>
> select mstwid as warehouseCode, mstiid as itemCode order by
> warehouseCode
>
> The error that it gives is Column unknown WAREHOUSECODE
>
> I am using a persistence layer that uses this construct....
> Other then, "use a different persistence layer", does anyone have any
> advice?
>
> Thanks
> Mark
>