Updating fetch in plsql
So why does it seem that "INV_TOTAL is not updating, only the inv_discount"?Because you're updating INV_TOTAL with INV_DISCOUNT, and the database is going to use the I guess the issue here is that you are updating INV_DISCOUNT and the INV_TOTAL uses the INV_DISCOUNT. You can use returning clause of update statement to use the new INV_DISCOUNT and use it to update INV_TOTAL.
Preventing Malicious or Accidental Access of Open Cursor Numbers An error, subprogram is called with a cursor number that does not denote an open cursor. This index is initialized to "indx" at declare c NUMBER; d NUMBER; n_tab DBMS_SQL.
If you try to fetch from a cursor variable before opening it or after closing it, PL/SQL raises the predefined exception The name of a cursor variable declared in a PL/SQL host environment, passed to PL/SQL as a bind argument, and then opened.
Do not put space between the colon (:) and statement retrieve one row at a time, use this clause to specify the variables or record in which to store the column values of a row that the cursor returns.
When the error is raised, an alert is issued to the alert log and DBMS_SQL becomes inoperable for the life of the session.
If the actual value for the cursor number in a call to the IS_OPEN Function denotes a cursor currently open in the session, the return value is subprogram that has no formal parameter for the cursor number; rather, it returns a cursor number. DEFINE_ARRAY(c, 1, n_tab, 10, indx); d := DBMS_SQL.