DBA Data[Home] [Help]

APPS.QA_PARENT_CHILD_COPY_PKG dependencies on DBMS_SQL

Line 694: id_table dbms_sql.Number_Table;

690: fetch_count NUMBER;
691: ignore NUMBER;
692: indx NUMBER := 1;
693:
694: id_table dbms_sql.Number_Table;
695: from_table dbms_sql.Date_Table;
696: to_table dbms_sql.Date_Table;
697: select_string VARCHAR2(4000);
698: update_string VARCHAR2(4000);

Line 695: from_table dbms_sql.Date_Table;

691: ignore NUMBER;
692: indx NUMBER := 1;
693:
694: id_table dbms_sql.Number_Table;
695: from_table dbms_sql.Date_Table;
696: to_table dbms_sql.Date_Table;
697: select_string VARCHAR2(4000);
698: update_string VARCHAR2(4000);
699: BEGIN

Line 696: to_table dbms_sql.Date_Table;

692: indx NUMBER := 1;
693:
694: id_table dbms_sql.Number_Table;
695: from_table dbms_sql.Date_Table;
696: to_table dbms_sql.Date_Table;
697: select_string VARCHAR2(4000);
698: update_string VARCHAR2(4000);
699: BEGIN
700: --sanity check

Line 717: --use dbms_sql to execute the sql

713: select_string := select_string || ':' || to_char(i) || ')';
714: END IF;
715: END LOOP;
716:
717: --use dbms_sql to execute the sql
718: c1 := dbms_sql.open_cursor;
719: dbms_sql.parse(c1, select_string, dbms_sql.native);
720:
721: --bind using the dest plan_ids from the phtable

Line 718: c1 := dbms_sql.open_cursor;

714: END IF;
715: END LOOP;
716:
717: --use dbms_sql to execute the sql
718: c1 := dbms_sql.open_cursor;
719: dbms_sql.parse(c1, select_string, dbms_sql.native);
720:
721: --bind using the dest plan_ids from the phtable
722: i := p_phtable.FIRST;

Line 719: dbms_sql.parse(c1, select_string, dbms_sql.native);

715: END LOOP;
716:
717: --use dbms_sql to execute the sql
718: c1 := dbms_sql.open_cursor;
719: dbms_sql.parse(c1, select_string, dbms_sql.native);
720:
721: --bind using the dest plan_ids from the phtable
722: i := p_phtable.FIRST;
723: j := 1;

Line 725: dbms_sql.bind_variable(c1, ':' || to_char(j), p_phtable(i).dest_id);

721: --bind using the dest plan_ids from the phtable
722: i := p_phtable.FIRST;
723: j := 1;
724: WHILE (i IS NOT NULL) LOOP
725: dbms_sql.bind_variable(c1, ':' || to_char(j), p_phtable(i).dest_id);
726: i := p_phtable.NEXT(i);
727: j := j + 1;
728: END LOOP;
729:

Line 731: dbms_sql.define_array(c1, 1, id_table, 20, indx);

727: j := j + 1;
728: END LOOP;
729:
730: --set up the bulk collect arrays
731: dbms_sql.define_array(c1, 1, id_table, 20, indx);
732: dbms_sql.define_array(c1, 2, from_table, 20, indx);
733: dbms_sql.define_array(c1, 3, to_table, 20, indx);
734:
735: --execute the sql and collect the results

Line 732: dbms_sql.define_array(c1, 2, from_table, 20, indx);

728: END LOOP;
729:
730: --set up the bulk collect arrays
731: dbms_sql.define_array(c1, 1, id_table, 20, indx);
732: dbms_sql.define_array(c1, 2, from_table, 20, indx);
733: dbms_sql.define_array(c1, 3, to_table, 20, indx);
734:
735: --execute the sql and collect the results
736: ignore := dbms_sql.execute(c1);

Line 733: dbms_sql.define_array(c1, 3, to_table, 20, indx);

729:
730: --set up the bulk collect arrays
731: dbms_sql.define_array(c1, 1, id_table, 20, indx);
732: dbms_sql.define_array(c1, 2, from_table, 20, indx);
733: dbms_sql.define_array(c1, 3, to_table, 20, indx);
734:
735: --execute the sql and collect the results
736: ignore := dbms_sql.execute(c1);
737: loop

Line 736: ignore := dbms_sql.execute(c1);

732: dbms_sql.define_array(c1, 2, from_table, 20, indx);
733: dbms_sql.define_array(c1, 3, to_table, 20, indx);
734:
735: --execute the sql and collect the results
736: ignore := dbms_sql.execute(c1);
737: loop
738: fetch_count := dbms_sql.fetch_rows(c1);
739:
740: dbms_sql.column_value(c1, 1, id_table);

Line 738: fetch_count := dbms_sql.fetch_rows(c1);

734:
735: --execute the sql and collect the results
736: ignore := dbms_sql.execute(c1);
737: loop
738: fetch_count := dbms_sql.fetch_rows(c1);
739:
740: dbms_sql.column_value(c1, 1, id_table);
741: dbms_sql.column_value(c1, 2, from_table);
742: dbms_sql.column_value(c1, 3, to_table);

Line 740: dbms_sql.column_value(c1, 1, id_table);

736: ignore := dbms_sql.execute(c1);
737: loop
738: fetch_count := dbms_sql.fetch_rows(c1);
739:
740: dbms_sql.column_value(c1, 1, id_table);
741: dbms_sql.column_value(c1, 2, from_table);
742: dbms_sql.column_value(c1, 3, to_table);
743:
744: exit when fetch_count <> 20;

Line 741: dbms_sql.column_value(c1, 2, from_table);

737: loop
738: fetch_count := dbms_sql.fetch_rows(c1);
739:
740: dbms_sql.column_value(c1, 1, id_table);
741: dbms_sql.column_value(c1, 2, from_table);
742: dbms_sql.column_value(c1, 3, to_table);
743:
744: exit when fetch_count <> 20;
745: end loop;

Line 742: dbms_sql.column_value(c1, 3, to_table);

738: fetch_count := dbms_sql.fetch_rows(c1);
739:
740: dbms_sql.column_value(c1, 1, id_table);
741: dbms_sql.column_value(c1, 2, from_table);
742: dbms_sql.column_value(c1, 3, to_table);
743:
744: exit when fetch_count <> 20;
745: end loop;
746: dbms_sql.close_cursor(c1);

Line 746: dbms_sql.close_cursor(c1);

742: dbms_sql.column_value(c1, 3, to_table);
743:
744: exit when fetch_count <> 20;
745: end loop;
746: dbms_sql.close_cursor(c1);
747:
748: --make sure we got everything
749: IF id_table.COUNT <> n THEN
750: x_msg_data := 'Invalid fetch count('||id_table.COUNT||'), expecting('||n||').';

Line 768: c2 := dbms_sql.open_cursor;

764: END LOOP;
765:
766: --now perform the bulk DML update
767: update_string := 'UPDATE QA_PLANS SET effective_from = :1, effective_to = :2 WHERE plan_id = :3';
768: c2 := dbms_sql.open_cursor;
769: dbms_sql.parse(c2, update_string, dbms_sql.native);
770: dbms_sql.bind_array(c2, ':1', from_table);
771: dbms_sql.bind_array(c2, ':2', to_table);
772: dbms_sql.bind_array(c2, ':3', id_table);

Line 769: dbms_sql.parse(c2, update_string, dbms_sql.native);

765:
766: --now perform the bulk DML update
767: update_string := 'UPDATE QA_PLANS SET effective_from = :1, effective_to = :2 WHERE plan_id = :3';
768: c2 := dbms_sql.open_cursor;
769: dbms_sql.parse(c2, update_string, dbms_sql.native);
770: dbms_sql.bind_array(c2, ':1', from_table);
771: dbms_sql.bind_array(c2, ':2', to_table);
772: dbms_sql.bind_array(c2, ':3', id_table);
773: ignore := dbms_sql.execute(c2);

Line 770: dbms_sql.bind_array(c2, ':1', from_table);

766: --now perform the bulk DML update
767: update_string := 'UPDATE QA_PLANS SET effective_from = :1, effective_to = :2 WHERE plan_id = :3';
768: c2 := dbms_sql.open_cursor;
769: dbms_sql.parse(c2, update_string, dbms_sql.native);
770: dbms_sql.bind_array(c2, ':1', from_table);
771: dbms_sql.bind_array(c2, ':2', to_table);
772: dbms_sql.bind_array(c2, ':3', id_table);
773: ignore := dbms_sql.execute(c2);
774: dbms_sql.close_cursor(c2);

Line 771: dbms_sql.bind_array(c2, ':2', to_table);

767: update_string := 'UPDATE QA_PLANS SET effective_from = :1, effective_to = :2 WHERE plan_id = :3';
768: c2 := dbms_sql.open_cursor;
769: dbms_sql.parse(c2, update_string, dbms_sql.native);
770: dbms_sql.bind_array(c2, ':1', from_table);
771: dbms_sql.bind_array(c2, ':2', to_table);
772: dbms_sql.bind_array(c2, ':3', id_table);
773: ignore := dbms_sql.execute(c2);
774: dbms_sql.close_cursor(c2);
775:

Line 772: dbms_sql.bind_array(c2, ':3', id_table);

768: c2 := dbms_sql.open_cursor;
769: dbms_sql.parse(c2, update_string, dbms_sql.native);
770: dbms_sql.bind_array(c2, ':1', from_table);
771: dbms_sql.bind_array(c2, ':2', to_table);
772: dbms_sql.bind_array(c2, ':3', id_table);
773: ignore := dbms_sql.execute(c2);
774: dbms_sql.close_cursor(c2);
775:
776: --return success

Line 773: ignore := dbms_sql.execute(c2);

769: dbms_sql.parse(c2, update_string, dbms_sql.native);
770: dbms_sql.bind_array(c2, ':1', from_table);
771: dbms_sql.bind_array(c2, ':2', to_table);
772: dbms_sql.bind_array(c2, ':3', id_table);
773: ignore := dbms_sql.execute(c2);
774: dbms_sql.close_cursor(c2);
775:
776: --return success
777: x_msg_data := '';

Line 774: dbms_sql.close_cursor(c2);

770: dbms_sql.bind_array(c2, ':1', from_table);
771: dbms_sql.bind_array(c2, ':2', to_table);
772: dbms_sql.bind_array(c2, ':3', id_table);
773: ignore := dbms_sql.execute(c2);
774: dbms_sql.close_cursor(c2);
775:
776: --return success
777: x_msg_data := '';
778: x_return_status := fnd_api.g_true;

Line 781: if dbms_sql.is_open(c1) then

777: x_msg_data := '';
778: x_return_status := fnd_api.g_true;
779:
780: exception when others then
781: if dbms_sql.is_open(c1) then
782: dbms_sql.close_cursor(c1);
783: end if;
784: if dbms_sql.is_open(c2) then
785: dbms_sql.close_cursor(c2);

Line 782: dbms_sql.close_cursor(c1);

778: x_return_status := fnd_api.g_true;
779:
780: exception when others then
781: if dbms_sql.is_open(c1) then
782: dbms_sql.close_cursor(c1);
783: end if;
784: if dbms_sql.is_open(c2) then
785: dbms_sql.close_cursor(c2);
786: end if;

Line 784: if dbms_sql.is_open(c2) then

780: exception when others then
781: if dbms_sql.is_open(c1) then
782: dbms_sql.close_cursor(c1);
783: end if;
784: if dbms_sql.is_open(c2) then
785: dbms_sql.close_cursor(c2);
786: end if;
787: x_msg_data := 'unexpected error: Code('||SQLCODE||'), Message("'||SQLERRM||'")';
788: x_return_status := fnd_api.g_false;

Line 785: dbms_sql.close_cursor(c2);

781: if dbms_sql.is_open(c1) then
782: dbms_sql.close_cursor(c1);
783: end if;
784: if dbms_sql.is_open(c2) then
785: dbms_sql.close_cursor(c2);
786: end if;
787: x_msg_data := 'unexpected error: Code('||SQLCODE||'), Message("'||SQLERRM||'")';
788: x_return_status := fnd_api.g_false;
789: RETURN;