Skip to content

Tag: plsql

How to get old variable value from PL/SQL for loop?

I am trying to get old value from variable in PL/SQL for loop. For instance: I have l_sequnce variable with increment of 10. I hope I described the problem well 🙂 Answer Use ORDER BY in the SELECT statement and then you only need to check if the value has changed between the previous and current values: Or, d…

HOW TO CHECK CONDITIONS FOR PREVIOUS MONTH

My table is like I am trying to get customer_ids where they didn’t do any transactions previous month and made transactions with at least 2 transaction_type at this_month.While doing this I am converting rundate to MM-YYYY format. What I’ve done for getting previous month and this month on MM-YYY …

Oracle trigger multiple conditions in when clause

I’m trying to create a trigger that updates a column in a table when other columns are updated. but getting the following error while saving the trigger ORA-25000: invalid use of bind variable in trigger WHEN clause My trigger is as follows, I’m not sure what is wrong with the code. Answer Althoug…