Quoth luuk34 <luu...@gmail.com>, on 2010-11-26 12:49:53 +0100: > The extra column seems to work, > but i thought this should work too?
I would imagine so, at first glance. > But the ORDER is wrong... How? The example you provided seems properly sorted. > sqlite> SELECT a,b FROM ( > ...> SELECT ID a, Price b FROM OrderTest WHERE Price < 200 > ...> UNION > ...> SELECT ID a, Price b FROM OrderTest WHERE Price > 500 > ...> ) > ...> ORDER BY a IS 0, b; > a|b > 3|0.0 > 4|25.0 > 1|50.0 > 2|75.0 > 5|100.0 > 7|1000.0 > 8|10000.0 > sqlite> ---> Drake Wilson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users