Input query:
SELECT a.ml_STi_File_id as File_ID, a.ML_STI_SRC_SYS_CD as Src_CD, concat(a.EVENT_CD,a.BUS_AREA_CD) as BE
FROM FFI_ERR_RLT_TRN a, summary_tbl b
WHERE a.ml_sti_src_sys_cd = b.ml_sti_src_sys_cd
AND a.ml_sti_load_dttm = b.ml_sti_load_dttm
AND a.ml_sti_cycle_cd = b.ml_sti_cycle_cd
AND a.ml_sti_file_id = b.ml_sti_file_id
AND a.ml_sti_srcsys_dttm = b.ml_sti_srcsys_dttm
AND a.ML_STI_CYCLE_CD = '0519201701'
group BY a.ML_STI_SRC_SYS_CD, a.ml_STi_File_id, a.BUS_AREA_CD,a.EVENT_CD, a.ml_sti_cycle_cd
order by a.ml_sti_src_sys_cd desc;
input:
FILE_ID SRC BE
-------- --- ------------------------
00428589 631
00428581 623 FTE
00428581 623 FTI
00428581 623 PRP
00428581 623 SPA
00428568 029
output which is required:
FILE_ID SRC BE
-------- --- ------------------------
00428589 631
00428581 623 PRP
00428581 623 SPA
00428568 029
Can someone help me with this?
Thanks in advance.
I'm using oracle SQL.
The input data is fetched using above query. From the input data I have to filter out the output as show above