PL/SQL help with loops, method and explanation for Pl/SQL loops
All,
I am new to PL/SQL and just can't seem to get the syntax right.
I am a PL/SQL newbie trying to create a package that will get a result (ID) from a query from two tables and then turn around and loop through the one or more records found and do an insert into a another based on
a select from the previous query. This is what I have now:
I am trying to create a package that will get the results of a query (a field on a table) and then turn around and get those results and plug them into a looping insert stmt on another table. Do I declare both tables?
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
I understand your business logic is something like 1) load a cursor -where you have to declare something then 2) loop into the cursor inserting into a second table something you get from a third table. Is that correct?
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Bookmarks