Monday, June 1, 2020

CASE Statement

select 
       case when status != 'Closed'
            then '<a href="'||apex_util.prepare_url('f?p='||:APP_ID||':2:'||:APP_SESSION||':::2:P2_ROWID:'||ROWID) || '"><img src="#IMAGE_PREFIX#menu/pencil2_16x16.gif" alt="edit"></a>' 
            else '&nbsp;'
            end edit_link,
       PROJECT,
       TASK_NAME,
       STATUS,
       ASSIGNED_TO,
       BUDGET,
       COST,
       case when status = 'On-Hold' then 0
            when status = 'Closed'  then cost
            else budget
            end estimated_cost
from EBA_DEMO_IR_PROJECTS

No comments:

Post a Comment

How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10

#########################Install Oracle  APEX 24.1################################ ----------------------------------------------------...