Hello Mathias, MaxDB does not allow an ORDER BY clause in a subquery. As with Oracle, the rownum is applied before sorting the result, so it won't help to add an ORDER BY at the end.
Regards Alexander Schr�der SAP DB, SAP Labs Berlin > -----Original Message----- > From: Stoedtler, Mathias [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 29, 2004 9:31 AM > To: [EMAIL PROTECTED] > Subject: Select and order by problem > > > Hello, > > I'm using MaxDB 7.5.00.14. I'm connected to DB using Oracle > SQL mode. I > trying a command which I used on Oracle: > > select * from (select * from table_1 order by attribute_1 asc) > where rownum <=5 > > But the statement causes a database error: > Auto Commit: On, SQL Mode: Oracle, Isolation Level: Committed > General error;-5016 POS(38) Missing delimiter: ). > > If I modify statement to something like this, it works but that's not > the result I want to have. > select * from (select * from table_1) where rownum <=5 > select * from (select * from table_1) where rownum <=5 order by > attribute_1 asc > > Can anybody tell me if this is bug or if MaxDB does not support the > above statement? > > > Thanx in advance > > Mathias > > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
