Is it possible to do something like select 1 as foo, foo+1 from dual
This returns ERROR at line 1: ORA-00904: "FOO": invalid identifier
I have a lengthy calculation that composes a column and I would like to be able to easily use that value for calculation in a difference column
You can't use an alias directly. One way is to use a derived table: