Hello! Tell me, please, why can the same procedure in pl / sql produce a different result? When you first start - we get the right result, when you restart it in this window - we get the wrong. Tried cleaning cash, set commit (wherever possible), but did not help. Maybe someone came across and will be able to help?
1 answer
This can happen if a batch variable is used inside a procedure. The variable is initialized when the package is first accessed in a session. Then, for example, your procedure sets a new value for the variable, and it "lives" the entire session. Commit and cache do not affect it. And this new value is used in calculations and gives an error.
Accordingly, you have an error in the code, it should be looked for and corrected.
|
DBMS_OUTPUT, step-by-step debugging, that's all ... As you find the reason, it becomes immediately clear what to do next. - Dmitriy