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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle/SQL Question

Re: Oracle/SQL Question

From: TurkBear <johng_at_mm.com>
Date: Fri, 17 Apr 1998 14:04:58 GMT
Message-ID: <35386111.1169181@news2.mm.com>


Lehner Eveline <a9325237_at_unet.univie.ac.at> wrote:

>Problem:
>Does anyone know of a way to store the result of a (dynamic!)
>Select-Statement in a table? Because I need to know the names of the
>selected attributes. And I also like to make queries to the
>result-table.
>
>I've tried to use:
>- CREATE TABLE .... AS SELECT .... (but it's not possible to use
>ORDER BY)
>- the package DBMS_SQL (but there's no way to get the names of the
>attributes)
>- write the result table in a text-file and then read it again into a
>table (not the easiest way!)
>
>Question:
>Is there no simple statement in (PL/)SQL?
>
>Thanks in Advance
>Eveline Lehner
>Vienna, Austria
>
>

Try
Create VIEW .... as select .... from table order By....Where.....

Then query the view....

John Greco
Oracle DBA
Email to john.greco_at_dot.state.mn.us Received on Fri Apr 17 1998 - 09:04:58 CDT

Original text of this message

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