Re: Sorting by a list of possible results in a column....

2007-06-05 Thread Peter Brawley
Mike I have a query that selects a list of results, ordering them by the status field. However, I want to further sort that by the type of status, that is: Undefined Ready for Review Top Priority Priority Completed ORDER BY FIELD( columnname, 'Undefined', 'Ready for Review', ... ) PB Mik

RE: Sorting by a list of possible results in a column....

2007-06-05 Thread Geoffroy Cogniaux
Hi, You could use a case statement to implicitly convert your column to everything you want: select status, case when status = 'undefined' then 4 when status = 'Top Priority' then 1 ... End as ord_status from development order by ord_status Bye Geoffroy -Messag

RE: Sorting by a list of possible results in a column....

2007-06-05 Thread Jay Blanchard
[snip] I have a query that selects a list of results, ordering them by the status field. However, I want to further sort that by the type of status, that is: Undefined Ready for Review Top Priority Priority Completed Etc... Every sort that I try, of course, sorts alphabetically. Is there a way