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: Jean-Marie Collin <jmc_at_ciger.be>
Date: Fri, 23 Oct 1998 16:33:14 +0100
Message-ID: <3630A1BA.64BEFD2B@ciger.be>


The SQL syntax to insert rows with a select is the following :

INSERT INTO FILM_HIRE SELECT FILM_NO,CINEMA_CODE,'1-Aug-98', '14-Aug-98', NULL

   FROM FILM,CINEMA
        WHERE FILM_NAME = 'Kundun' AND CINEMA_NAME = 'Rialto';

Oliver White a écrit:

> 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);
>
> I have this code, it's obviously wrong by the notes I have don't
> explain this structure, could someone explain why I get the error:
>
> (SELECT FILM_NO
> *
> ERROR at line 2:
> ORA-00936: missing expression
>
> And give me an example of proper syntax?
>
> I have RTFM that I have, but these are sadly :~( lacking.
>
> Your help anticipated with anxious glee. :)
> --
> On the smeeter.
> MHM 22x9
> --
Received on Fri Oct 23 1998 - 10:33:14 CDT

Original text of this message

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