ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Jang" <guangquanzh...@gmail.com>
Subject Sorted results not expected
Date Thu, 22 Mar 2007 07:43:16 GMT
hi all
    I used ORDER BY to get sorted results, but why is it not my expect results?
    My database is ORACLE 9.
    Any help will be appreciated

    Below is my sql statement:
		FROM (select rownum rno, a.a aa, a.b
		             ab, a.c ac, b.a ba, b.b bb, b.c bc, b.d bd,a.d ad,
a.lastupdatetime lastupdatetime, d.a da
			   from table1 a, table2 b, table3 c, table4 d
			   where a.id =	c.id and a.x = 1
				and a.y = 1 and	c.z = 1
				and a.sid = b.sid and a.id = #custID#
				and a.sid = d.sid and ROWNUM &lt;= #endRow#
			 order by lastupdatetime desc)
	 WHERE rno &gt;= #startRow#

View raw message