Re: Select into select

From: Alex Filonov <afilonov_at_pro-ns.net>
Date: Fri, 13 Jul 2001 03:16:32 GMT
Message-ID: <3B4E680B.5E66BAAF_at_pro-ns.net>


Rahim wrote:

> I have this query
>
> select subcase.id_number
> (Select case.id_number
> From case
> Where case.objid=subcase.subcase2case) case_id
> from subcase
> where subcase.id_number='1000003A'
>
> I knwo, I can write this kind of query in Informix, MS SQL server. But
> when I write this query in Oracle, I got this error "Error: ORA-00936:
> missing expression"
>
> Can anyone tell me, what Im doing wrong?
>
> the above query is just a sample, I have a bigger query in which I
> have to use SELECT into SELECT
>
> thanks in advance.
> regards
>
> rahim

  1. You need a comma in the end of the first line:

select subcase.id_number,

2. What version of Oracle? This syntax works only starting with 8.1:

SQL> select 'A' name,
  2 (select 1 from dual) id
  3 from dual;

N ID
- ----------
A 1

Alex. Received on Fri Jul 13 2001 - 05:16:32 CEST

Original text of this message