ORDER BY Clause error in cursor [message #661443] |
Fri, 17 March 2017 12:52 |
|
billgates
Messages: 19 Registered: March 2017
|
Junior Member |
|
|
Hey Fellas,
In a 6i form I am and trying to fetch last 5 issue numbers in a cursor from a table names ims_issue. Syntax is as follows
cursor a_cursor is
select * from (select issueno as sale from ims_issue where posted='T' and itemcode=:ims_issue.itemcode order by isssuedate desc) where rownum<=5 order by rownum;
If I run this statement in PLSQL Developer (Allround Automations) it works. But in forms 6i trigger it gives an error on "ORDER BY" in inner select statement. Error message is as follows
Error 103 at line 50, column 104
Encountered the symbol "ORDER" when expecting one of the following:
.()*@%&-+/
The symbol ")" was substituted for "ORDER" to continue.
Why is that and how to solve it. Please help.
I am posting this question in PLSQL Forum instead of Forms Forum because its a PLSQL problem in my thinking.
|
|
|
Re: ORDER BY Clause error in cursor [message #661447 is a reply to message #661443] |
Fri, 17 March 2017 13:39 |
|
Michel Cadot
Messages: 68693 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Where is line 50, column 104?
Quote:order by rownum;
This is silly, result set is ALWAYS ordered by ROWNUM as ROWNUM is defined by the order in which the rows are returned.
The problem is that you are using a version that was desupported at the beginning of this century, was the worst Oracle has ever delivered, full of bugs and no one can remember if this error was the case 15 years ago, we now are 7 versions ahead, would you post in Microsoft forum a question about Windows Millenium or NT 3.51? Why don't you use a newer version?
Your version documentation is there. Search in it by yourself if this ORDER BY is allowed.
[Edit: missing word]
[Updated on: Sat, 18 March 2017 01:49] Report message to a moderator
|
|
|
|
|
|
|
|
|