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: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 23 Oct 1998 14:17:25 GMT
Message-ID: <36328fae.6599709@192.86.155.100>


A copy of this was sent to ojw_at_iinet.net.au (Oliver White) (if that email address didn't require changing) On Fri, 23 Oct 1998 12:34:12 GMT, you 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);
>
>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

try

insert into film_hire
select film.film_no, cinema.cinema_code, '1-Aug-98', '14-Aug-98', NULL   from film, cinema
 where film.file_name = 'Kundun'
   and cinema_name = 'Rialto'
/  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Oct 23 1998 - 09:17:25 CDT

Original text of this message

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