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: [student] Nested SELECT statement. Going insane :(

Re: [student] Nested SELECT statement. Going insane :(

From: Alan D. Mills <alanmNOSPAM_at_uk.europe.mcd.mot.com>
Date: Fri, 23 Oct 1998 16:01:47 +0100
Message-ID: <70q5nm$o3v$1@schbbs.mot.com>


I think he needs to merge the two selects into one join rather than use a union operator. As I understand it each select in the original question is intended to return values for a different field within the same record.

And, yes, remove the VALUES keyword.

--
Alan D. Mills

Nuno Guerreiro wrote in message <36308d8a.105244002_at_news.telecom.pt>...
>On Fri, 23 Oct 1998 12:34:12 GMT, ojw_at_iinet.net.au (Oliver White)
>wrote:
>
>>INSERT INTO FILM_HIRE VALUES
>> ((SELECT FILM_NO
>> FROM FILM
>> WHERE FILM_NAME = 'Kundun'),
>> (SELECT CINEMA_CODE
>> FROM CINEMA
>> WHERE CINEMA_NAME = 'Rialto'),
>> '1-Aug-98', '14-Aug-98', NULL);
>>
>
>
>You must omit the VALUES keyword and you can only use one SELECT. You
>can use the UNION operator in order to combine the 2 SELECTs into one.
>
Received on Fri Oct 23 1998 - 10:01:47 CDT

Original text of this message

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