--On mardi 14 mai 2002 08:05 -0400 Joel Burton <joel@joelburton.com> wrote:
> You're asking to have it be sorted as {2,1,3}, but the sample result data
> you give seems to sort by {1,2,3}. Or am I misunderstanding your question?
you're right, I messed up my example :)
I'll buy the second solution, it's the easier to put on.
> 2) inlined in sql
>
> SELECT * FROM a
> ORDER BY CASE WHEN col3=2 THEN 1
> WHEN col3=1 THEN 2
> ELSE 3
> END;
--
Mathieu Arnold