Re: Stange Problem of Cursors (Combination of Minus and Order by Clause)

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/08/28
Message-ID: <35e7bab6.4470848_at_192.86.155.100>#1/1


A copy of this was sent to Sreenivas <knsvas_at_hotmail.com> (if that email address didn't require changing) On Thu, 27 Aug 1998 16:08:56 -0500, you wrote:

>Hi,
>
> I used the following query as cursor in creating a package body:
>
> select clli_org, trk_org, node_org
> from trunklis
> where trk_date='23-aug-98'
> minus
> select clli_org,trk_org,node_org
> from trunklis
> where trk_date='16-aug-98'
> order by node_org;
>
>it is giving the following error:
>order by item must be in Select-list expression.
>
>If i run the same query at SQL prompt, it is working fine.
>
>Can any one tell me What is the possible reason for this?
>

Its a parsing 'bug' in pl/sql.

The work around right now will be to "order by 3" instead of "order by node_org". The results will be the same.  

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 Aug 28 1998 - 00:00:00 CEST

Original text of this message