Relative Content

Tag Archive for sqloracleplsql

How to loop through multiple cursors in succession in PL/SQL

This is probably simple but I cannot find a good example online. I have 5 cursors I would like to iterate through in succession (loop through all of cursor 1, then loop through all of cursor 2, etc). The caveat is that I (believe I) need to open all the cursors at the same time, because I am deleting records in the loops that would affect the output of the select statements in the latter cursors… I want the cursors to reflect the output at the beginning of the program’s execution, not at the start of the loop for the cursor.

Total Count in each row

I have a requirement where I have different IDs but I want to show the count of total no of rows in the table in every row.

ORA-01403: no data found in oracle plsql procedure

One row of data exists for each combination of project_id and task number but it is throwing no data found error.
SELECT into throws error, but just a select with where clause is fetching one row of data.
Here is the procedure