1 2 Previous Next 17 Replies Latest reply: Jan 4, 2013 4:58 AM by Billy~Verreynne Go to original post RSS
      • 15. Re: Dynamic execution of plsql block inside trigger.
        I understand that from all of your replies , this dynamic approach is not possible because dynamic PL/SQL block is unlikely to have access to the :NEW and :OLD trigger variables. If I write dynamic plsql also, As execute immediate will execute the code as if it's a seperate process from the trigger and giving me the error "ORA-01008: not all variables bound" during execution. So if there is any new columns need to be included then I will change the code and I will deploy it in live. Thank you all for your prompt responses. Thank you.
        • 16. Re: Dynamic execution of plsql block inside trigger.
          William Robertson
          Yes, that's a good summary. As many have found, PL/SQL cannot iterate over the properties of the table/record like an object in JavaScript. Even if it can look the column names up from the dictionary or some other metadata table, it still has no way to access them dynamically. On the whole this is probably a Good Thing ;)
          • 17. Re: Dynamic execution of plsql block inside trigger.
            This can actually be done William - in a trigger. But the table needs to be of an object type. That allows one access to access the :NEW/:OLD structures dynamically.

            Of course, Dark Side of The Force stuff all the way...
            1 2 Previous Next