Hoping some one can help, when I run the following code in PL/SQL developer it runs without an issue - however when I put the same code into an IAL no records are created. Why would that be please ? With Rowsnum As (Select to_char(dt,'dd/mm/yyyy') dt, row_number() Over( Order by dt) rnFrom ( SELECT ifsapp.cd_user_util_api.get_previous_period_end_date(sysdate) -366+ level dt from dual connect by level <= ifsapp.cd_user_util_api.get_previous_period_end_date(sysdate) - (ifsapp.cd_user_util_api.get_previous_period_end_date(sysdate)-366)) rws where to_char ( dt, 'fmday', 'nls_date_language = English' ) = 'monday'), RqdParts As (select part_no, ifsapp.Inventory_Part_API.Get_Description(CONTRACT,PART_NO) part_description, ContractFROM ifsapp.Inventory_Partwhere contract Not In ('CPH','CTM','VMS','CGP') --and part_no In ('WMPI10067','500086536','WSBB10501','WMVA10007')and Nvl(Substr(ifsapp.Inventory_Part_API.Get_Accounting_Group(contract,part_no),1,2),'Y') Not In ('IS','PH')) select ip.part_no