Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Similar to alias, but to be reusable in all clauses of SQL: SELECT
qazmlp1209_at_rediffmail.com wrote:
> I have to use only a converted form of a column value (E.g.
> SUBSTR(TO_CHAR(my_function(Column-1)),1,17))) in all the clauses of my
> SQL statement i.e. where, having, group by, order by clauses.
> The statement looks ugly if I put the samething in al the places. How
> can I make it to mention in only one place, so that I can reuse it in
> other parts of the SQL statement. I suppose I cannot use the column
> alias as it can be reused only at the Order by clause.
>
> A quick look at the PL/SQL tutorial did not fetch me anything related
> to it. Can anybody help here?
btw this is a SQL question, which might explain why you found nothing helpful in the PL/SQL documentation. Received on Thu Jan 18 2007 - 05:03:09 CST