my period parameter is not mandatory, if the user is not giving any input then the current date in YYMM format should be defaulted e.g: 1604. Something like
if p_period is null then
select to_varchar(now(),'YYMM')
INTO v_period
from dummy;
else
v_period := p_period;
end if;
But the above is not working in a scripted calc. view, when i am using the same in procedure in catalog folder its working as desired. I want to achieve the same functionality in calc view.