Reputation: 4727
I have written below CASE
statement for my logic to work. But it's not working and giving me error as
Error(224,122): PLS-00103: Encountered the symbol ")" when expecting one of the following: * & = - + < / > at else end in is mod remainder not rem when <an exponent (**)> <> or != or ~= >= <= <> and or like like2 like4 likec between || member submultiset The symbol "end" was substituted for ")" to continue.
Below is my code:
V_AMTINMONTH := (CASE V_DATEVAR_VALUE WHEN 'START' THEN V_AMTINMONTH WHEN 'END' THEN (V_AMTINMONTH - V_NOOFDAYSINMONTH + 1));
Upvotes: 0
Views: 38
Reputation: 143023
Try
v_amtinmonth :=
CASE
WHEN v_datevar_value = 'START'
THEN
v_amtinmonth
WHEN v_datevar_value = 'END'
THEN
v_amtinmonth - v_noofdaysinmonth + 1
END;
Upvotes: 1