select to_char(app_n) as app_num, ASGN_CR_LIM_A as climit,
fnal_disp_d as decision_dt,
enty_d as application_dt,
to_char(fnal_disp_d,'yyyy-mm') as decdt_yyyy_mm, fnal_disp_d-enty_d as days_to_decision,
case when stat_c='NEWACCOUNT' then 'Approved'
when stat_c='DECLINE' then 'Decline'
end as app_decision,
APPCT_FICO_SCOR_N as applicant_fico,
CO_APPCT_FICO_SCOR_N as co_applicant_fico,
ICOME_A as Income, DBT_A, HIGH_LIM_A as High_Limit,
VERF_AST_N, SPND_NEED_N,
RECM_LINE_A, CELL_C, case when cell_c in ('CELL 10','') then 'AUTO'
else 'MANUAL'
end as decision, substr(UBS_card_I,13,4) as UBS_card_I
from bank_owner.ccu_application_info where stat_c in ('NEWACCOUNT','DECLINE') and curr_rec_f='Y'
and app_n not in (14005325,14007232,14007045) and (substr(to_char(ubs_carD_i),1,6) is null or substR(to_char(ubs_card_i),1,6) in ('419742'))
and fnal_disp_d between '01-JUNE-2017' and '30-JUNE-2017'
↧
How do I add "Date of Birth" to the below query so that I can pull the Date of Birth when I run the query?
↧