Re: SQL*Plus: Select in select

From: Michel Cadot <micadot_at_netcourrier.com>
Date: 2000/05/18
Message-ID: <8g0j2o$2m1s$1_at_news6.isdnet.net>#1/1


That syntax is not supported in Oracle7 and 8.0. You have to use:

 select t1.col1
      , t1.col2
      , t2.col1 col3

 from table2 t2, table1 t1
 where t2.keyval = t1.keyval
 and ...

It is supported in Oracle 8i (8.1).

--
Have a nice day
Michel


Henk Hultink <hhu_at_nospam.stoas.nl> a écrit dans le message : 3923B80D.76132B1B_at_nospam.stoas.nl...

> Hello,
>
> In a book about the SQL ANSI92 Standard I read about a way to put an
> SQL-select in a select, like i.e.:
>
> select t1.col1
> , t1.col2
> , ( select t2.col1
> from table2 t2
> where t2.keyval = t1.keyval
> ) col3
> from table1 t1
> where...
>
> etc.
>
> However, in SQL*Plus (3.3.2 on Oracle 7.3.4) I get an error (ORA-00936:
> missing expression) on the first line of the second SQL.
> Is this feature not supported by Oracle? Or maybe in Oracle8?
>
> TIA
>
> Henk Hultink
> Stoas Informatisering
> "Activating Knowledge"
> Wageningen
> The Netherlands
>
>
Received on Thu May 18 2000 - 00:00:00 CEST

Original text of this message