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!

case function to divide

944524Sep 11 2015 — edited Sep 11 2015

Hi,

Is is possible to use any divide function in oracle somthing like this

select case when id = 'N' then col_1/col_2 as derived from T1;

instead of using col_1/col_2 is there a way to use any divide function

or to be precise i need to use when id = 'N' i need to apply the divide logic because there are multiple columns where i need to divide from same Table T1

select case when id = 'N' then col_1/col_2 as derived, case when id = 'N' then col_2/col_2 as derived,case when id = 'N' then col_3/col_2 as derived,from T1;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 9 2015
Added on Sep 11 2015
20 comments
3,715 views