728x90
반응형
select b.sunap_d 실제상환일자, b.js_sum 실제상환액,
c.monthly_amt*c.div_month+c.first_amt
-(select sum(js_sum) from js_i00 where chae_no = b.chae_no and sunap_d between a.first_d and b.sunap_d and js_g in ('1','2','3','6'))
상환후잔액,
decode(a.status_g, '04', a.delay_cnt || '회차연체', '05', '실효', '정상') 연체상태
from crss_owner.ccms_debt_cust c, js_i00 b, crss_owner.ccms_perform_mgmt a
where a.resident_no = b.chae_no
and decode(a.first_d,'00000000',c.first_d,a.first_d) <= b.sunap_d
and a.resident_no = c.resident_no
and b.js_g in ('1','2','3','6')
and a.resident_no = '1111111111111';
c.monthly_amt*c.div_month+c.first_amt
-(select sum(js_sum) from js_i00 where chae_no = b.chae_no and sunap_d between a.first_d and b.sunap_d and js_g in ('1','2','3','6'))
상환후잔액,
decode(a.status_g, '04', a.delay_cnt || '회차연체', '05', '실효', '정상') 연체상태
from crss_owner.ccms_debt_cust c, js_i00 b, crss_owner.ccms_perform_mgmt a
where a.resident_no = b.chae_no
and decode(a.first_d,'00000000',c.first_d,a.first_d) <= b.sunap_d
and a.resident_no = c.resident_no
and b.js_g in ('1','2','3','6')
and a.resident_no = '1111111111111';
728x90
반응형
'SQL > ORACLE' 카테고리의 다른 글
[Oracle rank() 함수 쓰는 방법 (0) | 2014.02.12 |
---|---|
[Oracle]Transnames.ora 파일 설정방법 (0) | 2014.02.12 |
[Oracle]pledit 5.5 (0) | 2014.02.12 |
[Oracle]마지막일자, 마지막일 구하기 (0) | 2014.02.12 |
[Oracle]오라클 함수모음 숫자, 날짜, 등등 (0) | 2014.02.12 |
[Oracle] Hint 사용 예제 (0) | 2014.02.12 |
[Oracle] 오라클 힌트 사용 모음.. (0) | 2014.02.12 |
[Oracle]실행계획 Nested Loops이냐 Sort Merge조인이냐.. (0) | 2014.02.12 |