Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sending table as an object to procedure
"Vladimir M. Zakharychev" <bob_at_dpsp-yes.com> wrote in message news:<ah8vfo$ht4$1_at_babylon.agtel.net>...
> Well, despite the harsh words Sybrand used, his point holds up - approach
> you suggested is incorrect. a) applies for sure if you use EXECUTE IMMEDIATE
> and can be slightly reduced (but not totally avoided) with DBMS_SQL and
> cursor caching; and b) is true unless you call the procedure in an AFTER INSERT
> OR UPDATE trigger (and the question was about BEFORE triggers.)
>
> Corrections and additions welcome.
Looks like you also missed the whole point...I hope you read the original post in this thread.
He was asking a specific question as to how to pass a table name as an object to a procedure. He *did not* ask whether this procedure *can* be used in a BEFORE trigger or not.
> can I
> create a generic procedure that will accept the name of table as an
> input argument and that will fulfill columns USER_CREATED, DATE_CREATED,
> USER_MODIFIED, DATE_MODIFIED of that given table with appropriate
> values.
>
> Finally, my problem is that I do not know how to send the table (as an
> object) to procedure!
If he has coded the triggers himself then I assume and *hope* he knows what he is trying to do and whether to use BEFORE trigger or AFTER trigger and what is table mutation. If he had asked whether this is a *good/bad* or *doable* solution...then he would have gotten a different response.
My post answered the basic question posed by him...How to pass table name as an object to a procedure? and obviously my solution is to use DBMS_SQL or EXECUTE IMMEDIATE.
Sybrand...you *may not* respond. This is *ONLY* for people whose IQ is greater then their age!!!
Regards
//Rauf Sarwar
Received on Fri Jul 19 2002 - 14:47:07 CDT