Hi all,
Can u pls help me on this.
I want to have something like below in procedure.
----------------------------------
FOR CUR_A IN (
SELECT A.AMOUNT , B.PLANID ,B.EVENTCD
FROM ACCUMULATON A, PLAN B
WHERE A.PLANID = B.PLANID
AND B.DEALERID = 1
IF aFlag = 1 THEN
AND A.OFFERING = B.OFFERING
ENDIF
)
LOOP ......
--------------------
The if else statement is what I want given logically. aFlag is a variable to be set dynamically. I want the last AND condition to be used depending on the Flag value. The Cursor Loop must stay.
Can any one tell me how can do this?
saby
Can u pls help me on this.
I want to have something like below in procedure.
----------------------------------
FOR CUR_A IN (
SELECT A.AMOUNT , B.PLANID ,B.EVENTCD
FROM ACCUMULATON A, PLAN B
WHERE A.PLANID = B.PLANID
AND B.DEALERID = 1
IF aFlag = 1 THEN
AND A.OFFERING = B.OFFERING
ENDIF
)
LOOP ......
--------------------
The if else statement is what I want given logically. aFlag is a variable to be set dynamically. I want the last AND condition to be used depending on the Flag value. The Cursor Loop must stay.
Can any one tell me how can do this?
saby
Comment