37: BEGIN
38:
39: FOR l_get_sublines_rec IN l_get_sublines_csr
40: LOOP
41: UPDATE okc_k_lines_b
42: Set date_terminated = null
43: where id = l_get_sublines_rec.id;
44:
45: If l_get_sublines_rec.sts_code = 'TERMINATED' Then
44:
45: If l_get_sublines_rec.sts_code = 'TERMINATED' Then
46:
47: If trunc(l_get_sublines_rec.start_date) > trunc(Sysdate) Then
48: Update OKC_K_LINES_B set sts_code = 'SIGNED' Where id = l_get_sublines_rec.id;
49: Else
50: If trunc(Sysdate) between l_get_sublines_rec.start_date and l_get_sublines_rec.end_date Then
51: Update Okc_k_lines_b Set sts_code = 'ACTIVE' Where id = l_get_sublines_rec.id;
52: End If;
47: If trunc(l_get_sublines_rec.start_date) > trunc(Sysdate) Then
48: Update OKC_K_LINES_B set sts_code = 'SIGNED' Where id = l_get_sublines_rec.id;
49: Else
50: If trunc(Sysdate) between l_get_sublines_rec.start_date and l_get_sublines_rec.end_date Then
51: Update Okc_k_lines_b Set sts_code = 'ACTIVE' Where id = l_get_sublines_rec.id;
52: End If;
53: End If;
54:
55: End If;