Subject Re: RES: [firebird-support] ORDER BY
Author Fred Gordon
I ran into this problem also.

I was porting an application from MySQL to Firebird and I had a query
joining three tables and was using an alias. Ordering by the alias
work on the MySQL database but I had to change the order by statements
to include the table name dot field name and not use the alias.

Should you be able to use the alias in the order by statement? Does
anyone know off hand what the SQL spec states?

-Fred.

Marcelo Pitanga wrote:

> Hi, Cleber
>
> Try
>
> order by 2 ASC
>
> > ----- Mensagem original -----
> > De: Cleber Amaral [SMTP:clebercbr@...]
> > Enviada em: sexta-feira, 6 de agosto de 2004 11:50
> > Para: firebird-support@yahoogroups.com
> > Assunto: [firebird-support] ORDER BY
> >
> > Hello,
> >
> > how I do an order by in the following case unless error:
> >
> > select
> > table1.contador,
> > table2.Nome as NomeTable2
> > from
> > table1,
> > table2
> > where
> > table1.cdTable2 = table2.contador
> > order by
> > NomeTable2 ASC
> >
> > When I use a "Alias" for table2.Nome
> >
> > Someone knows?
> >
> > thanks
> >
> > Cleber
> >
> >
> > - - - - - - - - - - -
> > Cleber J. Amaral
> > - - - - - - - - - - -
> >
> >
> > ---------------------------------
> > Lèche-vitrine ou lèche-écran ? Yahoo! Magasinage.
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>
> *Yahoo! Groups Sponsor*
> ADVERTISEMENT
> <http://us.ard.yahoo.com/SIG=12960quco/M=295196.4901138.6071305.3001176/D=groups/S=1705115386:HM/EXP=1091890450/A=2128215/R=0/SIG=10se96mf6/*http://companion.yahoo.com>
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
> * To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
> <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>