Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Referencing function result inside GROUP BY?
Vjeran Marcinko wrote:
> Hi.
>
> Is there some way to avoid redudancy inside SQL queries like :
>
> SELECT someFunction(t.column) FROM Table t GROUP BY someFunction(t.column)
>
> with something like:
>
> SELECT someFunction(t.column) AS result FROM Table t GROUP BY result
>
> Later gives me "invalid column name: result" error :-(
>
>
> -Vjeran
>
>
I think column aliases can be referenced only in the ORDER BY clause but
not in a GROUP BY.I read somewhere that ssing aliases in GROUP BY is a
violation of the SQL92 standard..
PS: FYI, This is possible in PgreSQL though
Amogh Received on Mon Sep 19 2005 - 04:07:31 CDT