Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> defaulting to the beginning of the year
Hi,
I have the below script in which I have been updating the 'effdate' to the
beginning of the year, each year.
Is there a way for me to fix the script so that I don't have to update
manually each year and it just
defaults to the beginning of the year?
Thanks
select decode(pull_level,'G','UNWRAPPED','S','WRAPPED') x,
prov_company,sum(gain_loss_amt) gloss
from work_glrp, event, inv_pull, std_invopt
where work_glrp.ev_id = event.id
and std_invopt.id = work_glrp.sdio_Id and (gain_loss_rsn_code not in ('NR','NC','NT','NF') or gain_loss_rsn_code is null) and ((std_invopt.pull_level = 'G' and work_glrp.ivpl_effdate >= '01-JAN-03' and inv_pull.id = work_glrp.ivpl_id) or (std_invopt.pull_level = 'S' and work_glrp.ivpl_effdate >= '01-JAN-03' and inv_pull.id = work_glrp.ivpl_id))GROUP BY decode(pull_level,'G','UNWRAPPED','S','WRAPPED'),prov_company / Received on Sat Jan 25 2003 - 13:18:13 CST