hi,
I am trying to insert multiple rows in a table using PL/SQL. I have two procedures and two tables. the first procedure gets the data from the source table, manipulates it and then sends the data to the second procedure which inserts the data into the target table. The way i do it, it inserts only one row into the target table. I am not able to understand what the problem is. It would be great if anyone could help me.
Following is the logic i am using:
First procedure
- select the source table data into a cursor.
- using for loop i pass the values into rowtype variable of target table.
- now i call the second procedure from here passing the values stored in the
rowtype.
Second procedure
- take the values from the first procedure and insert them into the table.
So far, i have 4 rows in the source table, but i am able to insert only 1 row.
I am guessing the problem might be with the calling of the procedure, but m not sure.
When i try to print the values from the first procedure without calling the second procedure, it prints the values for all the 4 rows.
Please help.
thanks,
Nabh4u.
I am trying to insert multiple rows in a table using PL/SQL. I have two procedures and two tables. the first procedure gets the data from the source table, manipulates it and then sends the data to the second procedure which inserts the data into the target table. The way i do it, it inserts only one row into the target table. I am not able to understand what the problem is. It would be great if anyone could help me.
Following is the logic i am using:
First procedure
- select the source table data into a cursor.
- using for loop i pass the values into rowtype variable of target table.
- now i call the second procedure from here passing the values stored in the
rowtype.
Second procedure
- take the values from the first procedure and insert them into the table.
So far, i have 4 rows in the source table, but i am able to insert only 1 row.
I am guessing the problem might be with the calling of the procedure, but m not sure.
When i try to print the values from the first procedure without calling the second procedure, it prints the values for all the 4 rows.
Please help.
thanks,
Nabh4u.
Comment