[sqlite] : it seems to be only orber by and group

2015-08-23 Thread R.Smith
This will work great - just a correction, there should be a comma after "columnB" in the order by clause, else it might not parse, so the revised is: SELECT * FROM table ORDER BY columnA, columnB, CASE WHEN columnC = 1 THEN 0 ELSE 1 END; On 2015-08-22 10:47 PM,

[sqlite] : it seems to be only orber by and group

2015-08-22 Thread Clemens Ladisch
afriendandmore wrote: > The table shall be ordered according to A. (Order by A) > But if C ist true and to the value B1 in this Record, there exists another > Record with B2 and B2 = B1, then B1 should be ordered in the row above B2. Do those two records have the same A values? Regards,

[sqlite] : it seems to be only orber by and group

2015-08-22 Thread Kevin Benson
On Sat, Aug 22, 2015 > afriendandmore wrote: > > The table shall be ordered according to A. (Order by A) > > But if C ist true and to the value B1 in this Record, there exists > another Record with B2 and B2 = B1, then B1 should be ordered in the row > above B2. If the B1 and B2, to which you

[sqlite] : it seems to be only orber by and group

2015-08-22 Thread afriendandmore
but I fail to get it done. Hello, I got the following problem, that I cannot get worked out. I have a table that has 3 columns A, B and C. C is a boolean Column, that indicates if the record has been logically deleted, It shall not be removed from the database. The table shall be ordered