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!

How to create formulas in an SQL statement

VactirioMay 25 2007 — edited May 30 2007
Hello,

I am trying to create a formula in an sql statement without creating a external function.

Here is my example :

select (x + y) as a,
(x + y) + 2
from dual


As you can see the formula “(X + Y)” is repeated.

I would be glad to write a select statement like that :


select (x + y) as a,
a + 2
from dual


any ideas?

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2007
Added on May 25 2007
16 comments
1,310 views