146:
147: IF x_lvcExactSelectClause <> 'PARTIAL_MATCH' THEN
148: -- Open the Dynamic Cursor with the select statement returned for Exact Match
149:
150: l_cursor_id := dbms_sql.open_cursor;
151: fnd_dsql.set_cursor(l_cursor_id);
152:
153: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
154: fnd_dsql.do_binds;
149:
150: l_cursor_id := dbms_sql.open_cursor;
151: fnd_dsql.set_cursor(l_cursor_id);
152:
153: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
154: fnd_dsql.do_binds;
155:
156: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
157:
152:
153: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
154: fnd_dsql.do_binds;
155:
156: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
157:
158: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
159:
160: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.*/
154: fnd_dsql.do_binds;
155:
156: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
157:
158: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
159:
160: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.*/
161: l_dsql_debug := fnd_dsql.get_text(TRUE);
162:
161: l_dsql_debug := fnd_dsql.get_text(TRUE);
162:
163: LOOP
164: -- fetch a row
165: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
166: x_match_cnt := x_match_cnt+1;
167: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
168:
169: Igs_Ad_Imp_Near_Mtch_Pkg.insert_row
163: LOOP
164: -- fetch a row
165: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
166: x_match_cnt := x_match_cnt+1;
167: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
168:
169: Igs_Ad_Imp_Near_Mtch_Pkg.insert_row
170: (x_rowid =>l_rowid,
171: x_org_id => lnOrg_ID,
183: ELSE
184: EXIT;
185: END IF;
186: END LOOP;
187: dbms_sql.close_cursor(l_cursor_id);
188:
189: /*If the dynamic Query returns only one row, then Update the
190: igs_ad_interface_table */
191:
236:
237: IF x_lvcPartialSelectClause IS NOT NULL THEN
238:
239: -- Execute the Dynamic SQL
240: l_cursor_id1 := dbms_sql.open_cursor;
241: fnd_dsql.set_cursor(l_cursor_id1);
242:
243: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
244: fnd_dsql.do_binds;
239: -- Execute the Dynamic SQL
240: l_cursor_id1 := dbms_sql.open_cursor;
241: fnd_dsql.set_cursor(l_cursor_id1);
242:
243: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
244: fnd_dsql.do_binds;
245:
246: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
247:
242:
243: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
244: fnd_dsql.do_binds;
245:
246: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
247:
248: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
249:
250: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.*/
244: fnd_dsql.do_binds;
245:
246: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
247:
248: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
249:
250: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.*/
251: l_dsql_debug := fnd_dsql.get_text(TRUE);
252:
251: l_dsql_debug := fnd_dsql.get_text(TRUE);
252:
253: LOOP
254: -- fetch a row
255: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
256: x_match_cnt := x_match_cnt+1;
257: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
258:
259: Igs_Ad_Imp_Near_Mtch_Pkg.insert_row
253: LOOP
254: -- fetch a row
255: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
256: x_match_cnt := x_match_cnt+1;
257: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
258:
259: Igs_Ad_Imp_Near_Mtch_Pkg.insert_row
260: (x_rowid =>l_rowid,
261: x_org_id => lnOrg_ID,
273: EXIT;
274: END IF;
275: END LOOP;
276:
277: dbms_sql.close_cursor(l_cursor_id1);
278: IF x_match_cnt = 0 THEN /* Partial match not found */
279: UPDATE igs_ad_interface
280: SET match_ind = cst_mi_val_11
281: WHERE interface_id = imp_person_rec.interface_id;
413: -- The above procedure will return 'PARTIAL_MATCH', if the exact match is not found
414:
415: IF x_lvcExactSelectClause <> 'PARTIAL_MATCH' THEN
416:
417: l_cursor_id := dbms_sql.open_cursor;
418: fnd_dsql.set_cursor(l_cursor_id);
419:
420: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
421: fnd_dsql.do_binds;
416:
417: l_cursor_id := dbms_sql.open_cursor;
418: fnd_dsql.set_cursor(l_cursor_id);
419:
420: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
421: fnd_dsql.do_binds;
422:
423: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
424:
419:
420: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
421: fnd_dsql.do_binds;
422:
423: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
424:
425: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
426: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
427: l_dsql_debug := fnd_dsql.get_text(TRUE);
421: fnd_dsql.do_binds;
422:
423: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
424:
425: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
426: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
427: l_dsql_debug := fnd_dsql.get_text(TRUE);
428: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
429: */
428: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
429: */
430: LOOP
431: -- fetch a row
432: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
433: x_match_cnt := x_match_cnt+1;
434: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
435:
436: /* Insert into igs_ad_imp_near_match, all the duplicate records */
430: LOOP
431: -- fetch a row
432: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
433: x_match_cnt := x_match_cnt+1;
434: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
435:
436: /* Insert into igs_ad_imp_near_match, all the duplicate records */
437: Igs_Ad_Imp_Near_Mtch_Pkg.insert_row
438: (x_rowid =>l_rowid,
451: ELSE
452: EXIT;
453: END IF;
454: END LOOP; /* End Loop for dup_matches_cur */
455: dbms_sql.close_cursor(l_cursor_id);
456: /*If the dynamic Query returns only one row, then Update the igs_ad_interface_table */
457: IF x_match_cnt = 1 THEN /* Only One Match is Found */
458: UPDATE igs_ad_interface
459: SET match_ind = cst_mi_val_12,
499:
500: IF x_lvcPartialSelectClause IS NOT NULL THEN
501:
502: /* Exceute the Partial Select Clause */
503: l_cursor_id1 := dbms_sql.open_cursor;
504: fnd_dsql.set_cursor(l_cursor_id1);
505:
506: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
507: fnd_dsql.do_binds;
502: /* Exceute the Partial Select Clause */
503: l_cursor_id1 := dbms_sql.open_cursor;
504: fnd_dsql.set_cursor(l_cursor_id1);
505:
506: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
507: fnd_dsql.do_binds;
508:
509: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
510:
505:
506: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
507: fnd_dsql.do_binds;
508:
509: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
510:
511: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
512:
513: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
507: fnd_dsql.do_binds;
508:
509: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
510:
511: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
512:
513: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
514: l_dsql_debug := fnd_dsql.get_text(TRUE);
515: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
516: */
517:
518: LOOP
519: -- fetch a row
520: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
521:
522: x_match_cnt := x_match_cnt+1;
523:
524: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
520: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
521:
522: x_match_cnt := x_match_cnt+1;
523:
524: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
525:
526: /* Insert into igs_ad_imp_near_match_int, all the duplicate records */
527: Igs_Ad_Imp_Near_Mtch_Pkg.insert_row
528: (x_rowid =>l_rowid,
543: END IF;
544:
545: END LOOP; /* End Loop for dup_matches_cur */
546:
547: dbms_sql.close_cursor(l_cursor_id1);
548:
549: IF x_match_cnt = 0 THEN /* No Partial match not found */
550: UPDATE igs_ad_interface
551: SET match_ind = cst_mi_val_11
726: x_postcode =>imp_person_rec.postcode
727: );
728:
729: IF x_lvcExactSelectClause <> 'PARTIAL_MATCH' THEN
730: l_cursor_id := dbms_sql.open_cursor;
731: fnd_dsql.set_cursor(l_cursor_id);
732:
733: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
734: fnd_dsql.do_binds;
729: IF x_lvcExactSelectClause <> 'PARTIAL_MATCH' THEN
730: l_cursor_id := dbms_sql.open_cursor;
731: fnd_dsql.set_cursor(l_cursor_id);
732:
733: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
734: fnd_dsql.do_binds;
735:
736: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
737:
732:
733: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
734: fnd_dsql.do_binds;
735:
736: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
737:
738: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
739: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
740: l_dsql_debug := fnd_dsql.get_text(TRUE);
734: fnd_dsql.do_binds;
735:
736: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
737:
738: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
739: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
740: l_dsql_debug := fnd_dsql.get_text(TRUE);
741: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
742: */
741: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
742: */
743: LOOP
744: -- fetch a row
745: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
746: x_match_cnt := x_match_cnt+1;
747: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
748:
749: IF Igs_Pe_Identify_Dups.g_primary_addr_flag = 'N' THEN
743: LOOP
744: -- fetch a row
745: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
746: x_match_cnt := x_match_cnt+1;
747: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
748:
749: IF Igs_Pe_Identify_Dups.g_primary_addr_flag = 'N' THEN
750: FOR temp_cur IN Party_Site_Cur(l_person_ID,p_c_addr_type) LOOP
751: lnParty_Site_ID := temp_cur.Party_Site_ID;
775: ELSE
776: EXIT;
777: END IF;
778: END LOOP; /* End Loop for dup_matches_cur */
779: dbms_sql.close_cursor(l_cursor_id);
780:
781: /*If the dynamic Query returns only one row, then Update the igs_ad_interface_table */
782: IF x_match_cnt = 1 THEN /* Only One Match is Found */
783: UPDATE igs_ad_interface
837:
838: IF x_lvcPartialSelectClause IS NOT NULL THEN
839:
840: /* Execute the Partial Select Clause */
841: l_cursor_id1 := dbms_sql.open_cursor;
842: fnd_dsql.set_cursor(l_cursor_id1);
843:
844: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
845: fnd_dsql.do_binds;
840: /* Execute the Partial Select Clause */
841: l_cursor_id1 := dbms_sql.open_cursor;
842: fnd_dsql.set_cursor(l_cursor_id1);
843:
844: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
845: fnd_dsql.do_binds;
846:
847: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
848:
843:
844: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
845: fnd_dsql.do_binds;
846:
847: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
848:
849: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
850:
851: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
845: fnd_dsql.do_binds;
846:
847: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
848:
849: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
850:
851: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
852: l_dsql_debug := fnd_dsql.get_text(TRUE);
853: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
853: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
854: */
855: LOOP
856: -- fetch a row
857: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
858:
859: x_match_cnt := x_match_cnt+1;
860:
861: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
857: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
858:
859: x_match_cnt := x_match_cnt+1;
860:
861: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
862:
863: --Get Party_Site_ID From the Cursor
864: IF Igs_Pe_Identify_Dups.g_primary_addr_flag = 'N' THEN
865: FOR temp_cur IN Party_Site_Cur(l_person_id,p_c_addr_type) LOOP
891: END IF;
892:
893: END LOOP; /* End Loop for dup_matches_cur */
894:
895: dbms_sql.close_cursor(l_cursor_id1);
896:
897: IF x_match_cnt = 0 THEN /* No Partial match not found */
898: UPDATE igs_ad_interface
899: SET match_ind = cst_mi_val_11
1086: x_postcode =>imp_person_rec.postcode
1087: );
1088:
1089: IF x_lvcExactSelectClause <> 'PARTIAL_MATCH' THEN
1090: l_cursor_id := dbms_sql.open_cursor;
1091: fnd_dsql.set_cursor(l_cursor_id);
1092:
1093: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
1094: fnd_dsql.do_binds;
1089: IF x_lvcExactSelectClause <> 'PARTIAL_MATCH' THEN
1090: l_cursor_id := dbms_sql.open_cursor;
1091: fnd_dsql.set_cursor(l_cursor_id);
1092:
1093: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
1094: fnd_dsql.do_binds;
1095:
1096: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
1097:
1092:
1093: dbms_sql.parse(l_cursor_id, x_lvcExactSelectClause, dbms_sql.native);
1094: fnd_dsql.do_binds;
1095:
1096: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
1097:
1098: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
1099: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
1100: l_dsql_debug := fnd_dsql.get_text(TRUE);
1094: fnd_dsql.do_binds;
1095:
1096: dbms_sql.define_column(l_cursor_id, 1, l_person_id);
1097:
1098: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id);
1099: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
1100: l_dsql_debug := fnd_dsql.get_text(TRUE);
1101: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
1102: */
1101: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
1102: */
1103: LOOP
1104: -- fetch a row
1105: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
1106:
1107: x_match_cnt := x_match_cnt+1;
1108:
1109: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
1105: IF dbms_sql.fetch_rows(l_cursor_id) > 0 THEN
1106:
1107: x_match_cnt := x_match_cnt+1;
1108:
1109: dbms_sql.column_value(l_cursor_id, 1, l_person_id);
1110:
1111: --Get Party_Site_ID From the Cursor based on primary address indicator
1112: IF Igs_Pe_Identify_Dups.g_primary_addr_flag = 'N' THEN
1113: FOR temp_cur IN Party_Site_Cur(l_person_ID,p_c_addr_type) LOOP
1137: ELSE
1138: EXIT;
1139: END IF;
1140: END LOOP; /* End Loop for dup_matches_cur */
1141: dbms_sql.close_cursor(l_cursor_id);
1142:
1143: /*If the dynamic Query returns only one row, then Update the igs_ad_interface_table */
1144: IF x_match_cnt = 1 THEN /* Only One Match is Found */
1145:
1201: );
1202:
1203: IF x_lvcPartialSelectClause IS NOT NULL THEN
1204: /* Exceute the Partial Select Clause */
1205: l_cursor_id1 := dbms_sql.open_cursor;
1206: fnd_dsql.set_cursor(l_cursor_id1);
1207:
1208: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
1209: fnd_dsql.do_binds;
1204: /* Exceute the Partial Select Clause */
1205: l_cursor_id1 := dbms_sql.open_cursor;
1206: fnd_dsql.set_cursor(l_cursor_id1);
1207:
1208: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
1209: fnd_dsql.do_binds;
1210:
1211: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
1212:
1207:
1208: dbms_sql.parse(l_cursor_id1, x_lvcPartialSelectClause, dbms_sql.native);
1209: fnd_dsql.do_binds;
1210:
1211: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
1212:
1213: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
1214:
1215: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
1209: fnd_dsql.do_binds;
1210:
1211: dbms_sql.define_column(l_cursor_id1, 1, l_person_id);
1212:
1213: l_num_of_rows := dbms_sql.EXECUTE(l_cursor_id1);
1214:
1215: /* This will print the Dynamic SQL statement prepared. Can be uncommented when testing.
1216: l_dsql_debug := fnd_dsql.get_text(TRUE);
1217: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
1217: Igs_Ad_Imp_001.logDetail('l_dsql_debug :'||l_dsql_debug);
1218: */
1219: LOOP
1220: -- fetch a row
1221: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
1222:
1223: x_match_cnt := x_match_cnt+1;
1224:
1225: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
1221: IF dbms_sql.fetch_rows(l_cursor_id1) > 0 THEN
1222:
1223: x_match_cnt := x_match_cnt+1;
1224:
1225: dbms_sql.column_value(l_cursor_id1, 1, l_person_id);
1226:
1227: --Get Party_Site_ID From the Cursor Based on primary address indicator
1228: IF Igs_Pe_Identify_Dups.g_primary_addr_flag = 'N' THEN
1229: FOR temp_cur IN Party_Site_Cur(l_person_ID,p_c_addr_type) LOOP
1252: EXIT;
1253: END IF;
1254: END LOOP; /* End Loop for dup_matches_cur */
1255:
1256: dbms_sql.close_cursor(l_cursor_id1);
1257:
1258: IF x_match_cnt = 0 THEN /* No Partial match not found */
1259: UPDATE igs_ad_interface
1260: SET match_ind = cst_mi_val_11