Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle/SQL Question
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
![]() |
![]() |