Hi,

I have this query:

SELECT DISTINCT ask_fuo.id FROM ask_fuo INNER JOIN ask_art USING (id) INNER
JOIN ask_art_personen USING (ora_nachweis_id) WHERE
(ask_art_personen.code IN('M0E9','M0GC','M0YR')) AND ask_art_personen.bezug
IN('B','D','S')
GROUP BY ask_fuo.id ORDER BY ask_fuo.id;

A sample database (19 KB zipped) for this query can be downloaded here:

http://www.enzinger.net/archives/sqlitetest.zip

Now testing this with SQLite 3.7.15.1 I noticed that the result set is not
properly ordered, despite the ORDER BY clause. My last tests with 3.7.13
returned an ordered result. Can anyone confirm this? Not quite sure if I'm
missing something obvious though ...

On a minor note, I also noticed that with 3.7.13 the DISTINCT clause could
be omitted, GROUP BY was enough to get each ID only once. With 3.7.15.1,
returned IDs are no longer unique with my data when I omit the DISTINCT
clause. I find both behaviours acceptable, but since I didn't find a
related hint in the release notes, I'm not sure if this change was
intended.

Any input welcome!

Greetings from Munich,
Wolfgang

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to