hi list
here's what i would like to do:
table1:
field0: id
field1: boolean
field2: numeric
field3: varchar
when selecting records from this table, i would like to have different sort
orders depending if field1 is true or false: all records with field1 = true
should be sorted with field2 first then field3, all records having field2 =
false sorted by field3 first then field2.
example:
field0 | field1 | field 2 | field3
-------------------------------------------
1 t 2 b
2 f 1 z
3 t 1 a
4 f 4 a
desired output after sorting
4 f 4 a
2 f 1 z
3 t 1 a
1 t 2 b
is this possible in a single query?
(i hope my explanations make sense ;-))
- thomas