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 -> PL/SQL puzzler

PL/SQL puzzler

From: Charles A. Christiansen, Jr. <charles_at_iconstructs.com>
Date: 1998/01/28
Message-ID: <886017579.1928265734@dejanews.com>#1/1

Hi all,

I'm having a bit of trouble getting an ORDER BY clause into a cursor. This is my PL/SQL code:

CURSOR c_ipf IS (SELECT EntryID, OrderNum FROM T1

        WHERE MainID = Main_ID AND ParentID = Parent_ID AND LevelNum = Level_Num AND OrderNum >= Order_Num

        ORDER BY OrderNum DESC);

What I get from the compiler is:

PLS-00103: Encountered the symbol "ORDER" when expecting one of the following: .()*@%& (. . .) the symbol ")" was substituted for "ORDER" to continue.

I haven't seen anything that says I can't put an ORDER BY clause into a cursor, though I have also never seen it done anywhere (the book I'm using to learn doesn't have any examples with ORDER BY clauses).

Any ideas / advice / chastisement? :)

Please respond via e-mail if possible - I don't have regular access to this group, but I will check it periodically as well. Thanks!



Charles A. Christiansen, Jr.
Programmer / Analyst
Interactive Constructs, Inc.
-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Wed Jan 28 1998 - 00:00:00 CST

Original text of this message

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