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: Tricky Dynamic SQL question

Re: Tricky Dynamic SQL question

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 26 Dec 2002 10:05:28 -0800
Message-ID: <92eeeff0.0212261005.3be1ae34@posting.google.com>


> Sorry its hard to explain. We have a table that stores a pointer to
> other suptype tables. So my supertype table is sort of a master table
> that tells me when I need to use certain other tables. Sort of a type
> hierarchy.

OK. Not sure what you are trying to do here but let's go with it.

>
> No my subtype tables are not identical. They have different column
> names and different numbers of columns.

Understandable. Different tables have different definition.

>
> So I select a row in the supertype table. It tells me to use table 'A'
> and another row tells me to use table 'B'. I need to make this dynamic
> because the subtype tables may change, plus we may add or subtract
> them.

This is confusing where you say the subtype tables may change. Are you editing the definition of the table dynamically where on every call... there may be different number of columns OR are you referring to data only?

>
> I think I can do this with dbms_sql and dynamically create columns
> with define_columns. Not sure how. Has anyone done this?

I guess if you spin on your head and sing kumbaya....it maybe possible.

However, I will still go with Daniel's post. If your solution is this dynamic and complicated....then it's time to hit the drawing board and come up with a simple solution if possible. Understandably, you are not the one who created this mess but you are the one who is piling onto it. Imagine the poor soul who follow in your footsteps and trying to debug some of this mess....yikes!

Regards
/Rauf Sarwar Received on Thu Dec 26 2002 - 12:05:28 CST

Original text of this message

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