[Home] [Help]
34: pkpatel 15-JAN-2003 Bug No: 2528605
35: Made the alt_id_value UPPER while inserting.
36: ***************************************************************** */
37: l_rowid VARCHAR2(25);
38: l_cwlk_id IGS_OR_CWLK.Crosswalk_Id%TYPE;
39: l_cwlk_dtl_id IGS_OR_CWLK_DTL.Crosswalk_Dtl_Id%TYPE;
40: l_status IGS_OR_CWLK_INT.Status%TYPE;
41: l_exception BOOLEAN := FALSE;
42: l_records_processed NUMBER(3);
35: Made the alt_id_value UPPER while inserting.
36: ***************************************************************** */
37: l_rowid VARCHAR2(25);
38: l_cwlk_id IGS_OR_CWLK.Crosswalk_Id%TYPE;
39: l_cwlk_dtl_id IGS_OR_CWLK_DTL.Crosswalk_Dtl_Id%TYPE;
40: l_status IGS_OR_CWLK_INT.Status%TYPE;
41: l_exception BOOLEAN := FALSE;
42: l_records_processed NUMBER(3);
43:
36: ***************************************************************** */
37: l_rowid VARCHAR2(25);
38: l_cwlk_id IGS_OR_CWLK.Crosswalk_Id%TYPE;
39: l_cwlk_dtl_id IGS_OR_CWLK_DTL.Crosswalk_Dtl_Id%TYPE;
40: l_status IGS_OR_CWLK_INT.Status%TYPE;
41: l_exception BOOLEAN := FALSE;
42: l_records_processed NUMBER(3);
43:
44: l_in_proc_alt_id igs_or_cwlk_dtl_int.alt_id_type%TYPE;
40: l_status IGS_OR_CWLK_INT.Status%TYPE;
41: l_exception BOOLEAN := FALSE;
42: l_records_processed NUMBER(3);
43:
44: l_in_proc_alt_id igs_or_cwlk_dtl_int.alt_id_type%TYPE;
45: l_in_proc_alt_value igs_or_cwlk_dtl_int.alt_id_value%TYPE;
46:
47: -- Cursor for fetching the records from IGS_OR_CWLK_INT table
48: -- based on the status passed as input
41: l_exception BOOLEAN := FALSE;
42: l_records_processed NUMBER(3);
43:
44: l_in_proc_alt_id igs_or_cwlk_dtl_int.alt_id_type%TYPE;
45: l_in_proc_alt_value igs_or_cwlk_dtl_int.alt_id_value%TYPE;
46:
47: -- Cursor for fetching the records from IGS_OR_CWLK_INT table
48: -- based on the status passed as input
49: CURSOR cur_cwlk_int(cp_stat VARCHAR2) IS
43:
44: l_in_proc_alt_id igs_or_cwlk_dtl_int.alt_id_type%TYPE;
45: l_in_proc_alt_value igs_or_cwlk_dtl_int.alt_id_value%TYPE;
46:
47: -- Cursor for fetching the records from IGS_OR_CWLK_INT table
48: -- based on the status passed as input
49: CURSOR cur_cwlk_int(cp_stat VARCHAR2) IS
50: SELECT *
51: FROM IGS_OR_CWLK_INT
47: -- Cursor for fetching the records from IGS_OR_CWLK_INT table
48: -- based on the status passed as input
49: CURSOR cur_cwlk_int(cp_stat VARCHAR2) IS
50: SELECT *
51: FROM IGS_OR_CWLK_INT
52: WHERE status = cp_stat;
53:
54: -- Cursor for fetching the records from the Crosswalk Detail Interface
55: -- tables based on the Crosswalk Interface Id from the Crosswalk table
52: WHERE status = cp_stat;
53:
54: -- Cursor for fetching the records from the Crosswalk Detail Interface
55: -- tables based on the Crosswalk Interface Id from the Crosswalk table
56: CURSOR cur_cwlk_dtl_int(cp_cwlk_int_id IGS_OR_CWLK_INT.Interface_Crosswalk_Id%TYPE) IS
57: SELECT *
58: FROM IGS_OR_CWLK_DTL_INT
59: WHERE interface_crosswalk_id = cp_cwlk_int_id;
60:
54: -- Cursor for fetching the records from the Crosswalk Detail Interface
55: -- tables based on the Crosswalk Interface Id from the Crosswalk table
56: CURSOR cur_cwlk_dtl_int(cp_cwlk_int_id IGS_OR_CWLK_INT.Interface_Crosswalk_Id%TYPE) IS
57: SELECT *
58: FROM IGS_OR_CWLK_DTL_INT
59: WHERE interface_crosswalk_id = cp_cwlk_int_id;
60:
61: FUNCTION validate_alt_id(p_alternate_id_type IN igs_or_org_alt_idtyp.org_alternate_id_type%TYPE)
62: RETURN BOOLEAN AS
103: -- Call the Insert Row procedure of the table handler for the
104: -- Crosswalk table
105: l_rowid := NULL;
106: l_cwlk_id := NULL;
107: IGS_OR_CWLK_PKG.Insert_Row(x_rowid => l_rowid,
108: x_crosswalk_id => l_cwlk_id,
109: x_institution_code => NULL,
110: x_institution_name => cwlkrec.institution_name);
111:
143:
144: l_in_proc_alt_id := cwlkdtlrec.alt_id_type;
145: l_in_proc_alt_value := UPPER(cwlkdtlrec.alt_id_value);
146:
147: IGS_OR_CWLK_DTL_PKG.Insert_Row(x_rowid => l_rowid,
148: x_crosswalk_dtl_id => l_cwlk_dtl_id,
149: x_crosswalk_id => l_cwlk_id,
150: x_alt_id_type => cwlkdtlrec.alt_id_type,
151: x_alt_id_value => UPPER(cwlkdtlrec.alt_id_value));
172: l_status := g_stat_prc;
173: END IF;
174:
175: -- Call the Update DML for updating the status appropriately
176: UPDATE IGS_OR_CWLK_INT
177: SET status = l_status
178: WHERE interface_crosswalk_id = cwlkrec.interface_crosswalk_id;
179:
180: -- Issue Commit for every 100 records
189: l_exception := FALSE;
190: END LOOP;
191:
192: -- Modification made for IGS.L, delete records that are successfully inserted/updated
193: DELETE FROM IGS_OR_CWLK_DTL_INT DTL
194: WHERE EXISTS
195: (SELECT 1
196: FROM IGS_OR_CWLK_INT MSTR
197: WHERE MSTR.STATUS = '1' AND
192: -- Modification made for IGS.L, delete records that are successfully inserted/updated
193: DELETE FROM IGS_OR_CWLK_DTL_INT DTL
194: WHERE EXISTS
195: (SELECT 1
196: FROM IGS_OR_CWLK_INT MSTR
197: WHERE MSTR.STATUS = '1' AND
198: MSTR.INTERFACE_CROSSWALK_ID = DTL.INTERFACE_CROSSWALK_ID);
199:
200: DELETE FROM IGS_OR_CWLK_INT WHERE STATUS = '1';
196: FROM IGS_OR_CWLK_INT MSTR
197: WHERE MSTR.STATUS = '1' AND
198: MSTR.INTERFACE_CROSSWALK_ID = DTL.INTERFACE_CROSSWALK_ID);
199:
200: DELETE FROM IGS_OR_CWLK_INT WHERE STATUS = '1';
201:
202: commit;
203:
204: EXCEPTION