On 7/3/2012 4:53 PM, Bart Smissaert wrote:
However if I do this:
SELECT READ_CODE, TERM30, TERM60, ENTRY_COUNT
FROM
READCODE
WHERE
TERM30 LIKE '%ANGINA%'
UNION
SELECT READ_CODE, TERM30, TERM60, ENTRY_COUNT
FROM
READCODE
WHERE
TERM60 LIKE '%ANGINA%'
Then I get the required ascending order on READ_CODE. This looks good
as this query is some 50% faster.
However, I am not sure if I can rely on this order to always happen.
I'd rather not if I were you. It's likely just an accident of
implementation. Generally, SQLite doesn't guarantee any particular order
of the records unless there's an explicit ORDER BY clause.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users