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: How to do this as a singleton select?

Re: How to do this as a singleton select?

From: Ryan Gaffuri <rgaffuri_at_cox.net>
Date: 10 Jan 2003 03:57:45 -0800
Message-ID: <1efdad5b.0301100357.465f2c38@posting.google.com>


The modeller is using a supertype, subtype design. I have a supertype table. This table has records that tell me which 'subtype' tables to use based on certain criteria.

My subtype tables are not always of the same form.

Didnt design it. Just have to use it. Plus, since the project is in RAD, the data isnt always accurate. So I may get told to use this subtype table, but it may be of the wrong structure(different columns that what I need) causing my dynamic cursor to throw an exception. So I have to filter it out.

Gotta be extra careful. Our GUI is done in .net. I dont know .net and the .net guys dont know the database.

Richard J Woodland <richwoodland_at_magicinterface.com> wrote in message news:<3E1C7D3E.580BFEDE_at_magicinterface.com>...
> AND COLUMN_NAME IN ('first column name','second column name','third column
> name','fourth column name')
>
> Rich X. Woodland.
> Magic Interface, Ltd.
>
> Ryan Gaffuri wrote:
>
> > I cant remember how to do this as one select statement.
> >
> > SELECT TABLE_NAME
> > FROM USER_TAB_COLUMNS
> > WHERE TABLE_NAME = p_tableName(this is a variable passed in)
> > and COLUMN_NAME = ... however, there are 4 column_names and all of
> > them have to appear.
> >
> > I know I can do it with 4 implicit cursors and just pass the results
> > to the next, but how do I do it with a subquery?
> >
> > SELECT column
> > into v_column
> > from table
> > where column = 'A'
> >
> > select column
> > into v_column2
> > from table
> > where column = v_column
> >
> > and so on...
> >
> > I know its basic, but I cant remember how to do this. Went brain dead.
Received on Fri Jan 10 2003 - 05:57:45 CST

Original text of this message

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