I badly explained myself.
I meant if it’s possible to use the “case when” command in the select end-select construct in Natural
NVL(case when flag_type='A' then sum(price) when flag_type='B' sum(price * 1,22) end,0) as price_tot
WHERE TB1.ID = TB2.ID
AND ID_BRAND = 'MYBRAND'
I’m also trying another solution:
WITH_CTE but does not work: error “Variable / field / view must be defined in DEFINE DATA.”
does not recognize the WITH_CTE command
I was left with no ideas