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: For Those Who Know DB2 and Oracle, Can You Take A Look

Re: For Those Who Know DB2 and Oracle, Can You Take A Look

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Fri, 18 Oct 2002 12:26:36 +0100
Message-ID: <3dafefec$0$1290$ed9e5944@reading.news.pipex.net>


"dude" <NOSPAM_at_thankyou.com> wrote in message news:3DAFE891.7040800_at_thankyou.com...

>

> No, what I was asking was whether Oracle allows you to create a result
> set in SQL. I know you can do it in PL/SQL but I'm interested in a pure
> SQL solution.

inline views are a pure sql construct that you can use all over the place in an sql statement. highly meaningless eg below.

SQL> select a.today,b.yesterday, (select 1 from dual) col_1   2 from
  3 (select sysdate as today from dual) a,   4 (select sysdate - 1 as yesterday from dual) b   5 where
  6 (select 1 from dual)= 1
  7 and today=yesterday+1;

TODAY YESTERDAY COL_1
--------- --------- ----------
18-OCT-02 17-OCT-02 1 SQL>

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Fri Oct 18 2002 - 06:26:36 CDT

Original text of this message

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