Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Tricky Dynamic SQL question
> We have supertype tables that keep logs of a variety of different
> tables. I have a function. So a record in a specific supertype table
> will tell you when a specific subtype table is being used.
>
> I have a function(that I didnt write) that I call earlier in the
> procedure, that tells me which table I need to use.
>
> I have a requirement where I need to dynamically select all columns in
> this table and put it into a record.
You can emulate "dynamic record" using PLSQL table as follows -
type dynamic_field is record( fieldname varchar2(30), fieldtype
varchar2(30), numeric_value number, datetime_value date, varchar_value
varchar2(4000));
type dynamic_record is table of dynamic_field index by binary_integer;
You can populate "dynamic records" using dbms_sql.
Or, you can extract your records into xml and then parse it into dom.
What exactly is required anyway? You said that you need to dynamically select all columns and put them into a record. What for? Received on Wed Dec 25 2002 - 04:36:28 CST