Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using column alias for calculations in same select list

318960Aug 10 2002
Hi All,
I want to use a calculated column of query to create further calculated columns in same query using column alias. I have to do so because the calculation is too big to write it everytime.
e.g.

Select decode(Month, 1, Tran_January, 2, Tran_February, ....) as MonthTran,
Month, Year,
round(MonthTran/Intrest_rate, 2) as Amount <---(using previous alias)
from ledger;

Thanks in advance,
Mona

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 9 2002
Added on Aug 10 2002
1 comment
478 views