Npa - Query For Finacle
Npa - Query For Finacle
select
substr(sol.region_name,1,10),
substr(sol.sol_desc,1,10),
sol.sol_id,
substr(gam.acct_name,1,15),
gam.foracid,
sum(sel_eab(gam.acid,'06-05-2013')),
--gam.clr_bal_amt,
lht.LIM_SANCT_DATE,
lht.SANCT_LIM,
gam.schm_code,
sub_classification_user,
SYSTEM_CLASSIFICATION_DATE,
user_classification_date
from acd,gam,lht,sol
where gam.acid=lht.acid
and gam.sol_id = sol.sol_id
and gam.acct_cls_flg ='N'
and gam.clr_bal_amt != '0'
and gam.acid=acd.B2K_ID
and gam.del_flg!='Y'
and gam.entity_cre_flg='Y'
AND acd.B2K_TYPE='ACCNT'
and gam.sol_id in(select sol_id from SST WHERE set_id ='ALL')
and sub_classification_user in('002')
and gam.schm_type in('LAA','ODA','CCA')
and lht.serial_num=(select max(serial_num) from lht where acid
=gam.acid and del_flg='N' and entity_cre_flg='Y')
and SYSTEM_CLASSIFICATION_DATE ='06-05-2013'
and NVL(sub_classification_user,'001') != '001'
order by sol.region_name,sol.sol_desc
/