Re: [GENERAL] Sorting by constant values

2005-05-03 Thread Ragnar Hafstað
On Tue, 2005-05-03 at 13:29 -0400, Robert Fitzpatrick wrote: > I have a column that I want to sort by certain values. The values are > Unit, Exterior and Common. I want all the records with Unit first, > Common second and Exterior last in the sort order. These are the only 3 > possible values, is t

Re: [GENERAL] Sorting by constant values

2005-05-03 Thread Scott Marlowe
On Tue, 2005-05-03 at 12:29, Robert Fitzpatrick wrote: > I have a column that I want to sort by certain values. The values are > Unit, Exterior and Common. I want all the records with Unit first, > Common second and Exterior last in the sort order. These are the only 3 > possible values, is there a

Re: [GENERAL] Sorting by constant values

2005-05-03 Thread Franco Bruno Borghesi
You can order by conditions, lets say column='Unit'. The evaluation of a conditions will give you 't' or 'f', and alfabetically 'f' < 't'... you should use DESC to get the matches first. So, it would be more or less like this: ORDER BY    column='Unit' DESC,    column='Exterior' DESC,    column='C

[GENERAL] Sorting by constant values

2005-05-03 Thread Robert Fitzpatrick
I have a column that I want to sort by certain values. The values are Unit, Exterior and Common. I want all the records with Unit first, Common second and Exterior last in the sort order. These are the only 3 possible values, is there a way to sort manually like that with the alphanumeric values?