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 -> Pro C precompile problem with UNION and ORDER BY

Pro C precompile problem with UNION and ORDER BY

From: <kshave_at_health.gov.mb.ca>
Date: Fri, 26 Feb 1999 15:01:56 GMT
Message-ID: <7b6d0u$8ln$1@nnrp1.dejanews.com>


I have the following piece of code that works in SQLPLUS ...

 select

      payee_last_name
   from claim, client
   where claim.client_id=client.client_id    and claim.gsas=client.gsas
   union
   select

      payee_last_name
   from adjustment, client
   where adjustment.pharmacy_client_id=client.client_id    and adjustment.gsas=client.gsas
   order by payee_last_name;

However, the same code in my Pro C (2.3.3) gives the following error ...

   select
...1
(1) PCC-S-02423, ORDER BY item must be the number of a SELECT-list expression

   select
...1
(1) PCC-S-02000, SQL Statement ignored

Semantic error at line 166, column 4, file DP20020.pc:

   select
...1
(1) PCC-S-02346, PL/SQL found semantic errors

I managed to get the statement to compile under Pro C but changing the ORDER BY statement to ...

ORDER BY 1;
(the first column).

Why won't the original statement work in Pro C if it works under SQLPLUS?

-Keith

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Feb 26 1999 - 09:01:56 CST

Original text of this message

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