Home > database > Questions about Oracle stored procedures for loop, rookie urgent solution
Questions about Oracle stored procedures for loop, rookie urgent solution
Time:09-28
Now have two temporary table, table A article 25 data, table B 588 data, the goal is to the each of the data in table A and table B in each of the data into A new data in the table C, according to the truth, there should be 25 * 588=14700 data, because involves the callback is poor, so I used the cursor, and data, using A combination of double layer for loop to come out the result of always article 25 * 25 * 588=367500 data, how is this to return A responsibility excuse me?
CodePudding user response:
CodePudding user response:
As above two figure, USES a stored procedure call another stored procedure
CodePudding user response:
Select * from a, b this statement can generate article 25 * 588 to meet the requirements of your data
CodePudding user response:
Didn't understand what you mean, it is suggested that posted the full code
CodePudding user response:
Upstairs positive solution first, and only need to select * from a, b, it is concluded that the is the cartesian product of table a and table b,
And although didn't see you all of the code, but guess, your first store there is no problem, but the second time
Annotations in the control loop number, can think you are a cycle is to use the number below to control the end of the cycle, but you then wrote a for the cycle of the cursor, this shows that your second procedure has two loops, combined with the first of the stored procedure a loop, just 25 * 25 * 588=367500, article 25 of the data table if you said is FSOBRANCHD_T this form, it should be so true,