Re: generate a stored procedure using another stored procedure

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Sat, 22 Feb 2003 16:43:30 GMT
Message-ID: <RMN5a.213907$HN5.885682_at_rwcrnsc51.ops.asp.att.net>


Have the stored proc write the stored proc to a varchar2 variable and then do execute immediate inside the first proc. Jim

--
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Murali" <murali_l_1729_at_yahoo.com> wrote in message
news:2cc5f0be.0302210922.6b9f8631_at_posting.google.com...

> I want to create stored procedure dynamically from a mapping table.
> Here is how my "mappingTable" table looks:
> ----------------------------------------------------------
> Plan, ObjectId, ObjectKey, ObjectAttribute, tableName
> Plan1 name John Doe SSN Employee
> ------------------------------------------------------------
> My aim is to create a stored procedure (say proc1) which has a series
> of Insert and update statements which would like this:
>
> --------------------------------------------------------------------------
-
> Insert into myTable (SSN) Select SSN from Employee where name = 'John
> Doe'
>
> --------------------------------------------------------------------------
--
> I want this "proc1" to be generated by another procedure by reading
> data from the mapping table above. I am running into problems with
> maximum length of a line to be 255 when i try to generate this using
> the DBMS_OUT utility.
>
> Is there a way around this? Or is there a utility that can help me do
> this.
> I would prefer to not write Java code that would read data and do
> this. I would like all of this to be preferably be inside the database
> (oracle 8.1.7)
>
> Thanks a lot for your help.
Received on Sat Feb 22 2003 - 17:43:30 CET

Original text of this message