Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: HELP - Order by problem

Re: HELP - Order by problem

From: Dennis Wetherell <dwether_at_mail.arco.com>
Date: 1998/08/25
Message-ID: <01bdd036$c7c6fc40$186be288@ato-10111>#1/1

The problem occurs because order by cannot be used in a subquery. Order by must be the last clause of the full sql statement. As soon as Oracle sees the order by statement, it assumes that the subquery should have ended, but it is confused since it didn't find a closing right paren.

Dennis
>
> EXE (exe_at_exesolutions.com) wrote:
> : > I'm using Oracle server 7.3.3.0.0 Why am I getting the
> : > following error in sql/plus
> : >
> : > SQL> update conv_observation_tables cot set ( person_id,role_type ) =
> : > 2 ( select person_id, role_type
> : > 3 from spi_survey_surveyors s1
> : > 4 where s1.spi_project_dc_id = cot.spi_project_dc_id
> : > 5 and rownum < 2
> : > 6 order by 1, 2 )
> : > 7 where observation_line_id = 4180;
> : > order by 1, 2 )
> : > *
> : > ERROR at line 6:
> : > ORA-00907: missing right parenthesis
>
> Jared Hecker | HWA Inc. - Oracle architecture and Administration
> jared_at_hwai.com | ** serving NYC and New Jersey **
>
Received on Tue Aug 25 1998 - 00:00:00 CDT

Original text of this message

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