odd problem with limit and order by
Posted: Fri 22 Feb 2013 10:02
I have an sqlite database with quite a few rows, say 1 million.
Using a uniquery I execute a sql query of the form
select a, b, c, x, y, z from table where y > 0 limit 500
everything works OK and UniQuery->RecordCount reports 500 after the query
if I change the query to:
select a, b, c, x, y, z from table where y > 0 order by b limit 500
UniQuery->RecordCount is 1 million !!
according to the sqlite web site I am formatting my query correctly any ideas?
http://sqlite.org/lang_select.html
Using a uniquery I execute a sql query of the form
select a, b, c, x, y, z from table where y > 0 limit 500
everything works OK and UniQuery->RecordCount reports 500 after the query
if I change the query to:
select a, b, c, x, y, z from table where y > 0 order by b limit 500
UniQuery->RecordCount is 1 million !!
according to the sqlite web site I am formatting my query correctly any ideas?
http://sqlite.org/lang_select.html