Select statement inside decode function in where condtion
1. select statement inside decode function that is part of where condtion in oracle report builder 10.1.2.... the select statment should be part of the decode function in where condtion
how to fix the error in this query. the decode should be part of the where condition
the error message is error 103 encountered the symbol "SELECT" when expecting one of the following ( - + <an identifer>, ) --so on
function CF_2Formula return Number is
BUDGET_TI_PERIOD_NAME NUMBER;
begin
select NVL(SUM(DECODE(GLB.ACTUAL_FLAG , 'B',
(NVL(GLB.BEGIN_BALANCE_DR,0) - NVL(GLB.BEGIN_BALANCE_CR,0))
+ (NVL(GLB.PERIOD_NET_DR,0) - NVL(GLB.PERIOD_NET_CR,0))