Gary Stainburn <gary.stainburn@ringways.co.uk> writes:
> > Alternatively: (a<>6),(a<>4),a
>
> Although this does exactly what I want, at first glance it should do
> exactly the opposite.
>
> I'm guessing that for each line it evaluates
> not (a=6) 0 for true else 1
Not really, "not a=6" is an expression that evaluates to a boolean, true or
false. true sorts as "greater" than false. That order is counterintuitive but
it's because the default sort order is ascending. So the "lesser" false
records appear first.
If you put "not a=6" in your select column list you'll see the true and false
values appear.
--
greg