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: Select in Select

Re: Select in Select

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 18 Oct 1999 12:45:55 GMT
Message-ID: <380b1647.1482378@news.demon.nl>


On Mon, 18 Oct 1999 12:57:31 +0200, Bessenyei Zsolt <bessenyei_at_flexum.hu> wrote:

>Hello,
>
>When I run this query:
>
>select field1, (select field2 from table2 where field3=1) from table1
>
>this error message appears:
>
>ORA-00936: missing expression
>
>Exactly the same query runs well on Sybase SQL Anywhere and MSSQL.
>
>How can I use a SELECT as a field ?
>
>Zsolt Bessenyei

Try
select field1

     , field2
from table1

   , (select field2

      from table2
      where field3 = 1 )


Hth,

Sybrand Bakker, Oracle DBA Received on Mon Oct 18 1999 - 07:45:55 CDT

Original text of this message

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