Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: creating/using type dynamically

Re: creating/using type dynamically

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Fri, 3 Mar 2006 16:34:52 -0500
Message-ID: <j4mdnWzLJNIdK5XZnZ2dnUVZ_tGdnZ2d@comcast.com>

"hitchhikar" <reachsonu_at_gmail.com> wrote in message news:1141417190.487488.202620_at_u72g2000cwu.googlegroups.com...
: Hi frnds,
: I am caught up in a very crazy yet obvious situation using pl/sql.
: I wil try to explain the issue here in hope of gettin some
: pointers/help
:
: I want to create a type based on the string which is my input parameter
: and then use that type.
: For eg,
:
: BEGIN
: ....
: <some code>
: ....
: EXECUTE IMMEDIATE
: 'CREATE TYPE myType AS TABLE OF '|| tblname ||'%ROWTYPE INDEX BY
: BINARY_INTEGER;';
: mytyp_var myType;
: ....
: <code>
: END;
:
:
: Now this wil create tht myType at runtime but the problem is compiling
: this piece of code as myType has nt been declared at the time of use.
: Is there a workarnd for this??where i can create and use on
: runtime...dynamically
:
: TIA
:

not standard procedure and not recommended.

if you could explain the business problem, there very likely is a solution that fits better with Oracle architecture and functionality.

++ mcs Received on Fri Mar 03 2006 - 15:34:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US