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: Problem with simple SQL query!

Re: Problem with simple SQL query!

From: Matt Brennan <mbrennan_at_gers.net>
Date: 1998/10/06
Message-ID: <01bdf13f$b2caa2e0$049a0580@mcb>#1/1

You also can't use an order by clause when doing an insert with a select, so that's probably the source of the error.

-- 
Matt Brennan
SQL*Tools Specialist
GERS Retail Systems
9725-C Scranton Road
San Diego, California 92121
1-800-854-2263
mbrennan_at_gers.com
(Original email address is spam-blocked...please change 'net' to 'com'.)

Michael Bierenfeld <michael.bierenfeld_at_ibsgmbh.de> wrote in article
<36189FDF.30F39905_at_ibsgmbh.de>...

> Terry Maguire wrote:
>
> > Hi
> >
> > Sorry there were mistakes in the previous message
> >
> > Could any please help me with this SQL statement. It seems OK but it
returns
> > the following error:
> >
> > order by market_cap desc
> > *
> > ORA-00933: SQL command not properly ended
> >
> > Here is the statement:
> >
> > insert into t_sedol (sedol)
> > select sedol from t_master_download
> > where rownum<=246
> > and country='United Kingdom'
> > and downloaddate='01-DEC-92'
> > order by market_cap desc;
> >
> > So basically I want to insert the 'sedol' value(s) into the table
't_sedol'.
> > The 'sedol' value(s) is a SELECT query that chooses its data from the
table
> > 't_master_download'. When I remove the ORDER part of the statement it
runs
> > fine but the ORDER is essential. Can anyone help on this one?
> >
> > Regards
> >
> > Terry Maguire
> > IIU
> > IFSC House
> > Custom House Quay
> > Dublin 1
> > Ireland
> > e:Mail - tmaguire_at_nospam.tinet.ie
> > ---Remove the nospam to e:Mail
>
> Hello,
>
> put the select statetement into brackets eg :
>
> insert into hallo2 (select * from hallo);
>
> Regards
>
> Michael
>
>
Received on Tue Oct 06 1998 - 00:00:00 CDT

Original text of this message

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