Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL puzzler
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!
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Wed Jan 28 1998 - 00:00:00 CST