Received: from eba-haus.de ([149.228.241.230]) by hub.org (8.9.3/8.9.3) with SMTP id CAA25557 for ; Thu, 13 Apr 2000 02:40:20 -0400 (EDT) (envelope-from DieringG@eba-haus.de) Received: from kopo001 by eba-haus.de;Thu, 13 Apr 2000 06:33:30 GMT with Novell_GroupWise; Thu, 13 Apr 2000 08:33:30 +0200 Message-Id: X-Mailer: Novell GroupWise 5.5 Date: Thu, 13 Apr 2000 08:32:59 +0200 From: "Gerhard Dieringer" To: , Subject: Antw: ORDER BY using specifc values Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.org id CAA25569 X-Archive-Number: 200004/137 Ian McWilton wrote: > ... > > INDEX | VALUE > 1, A > 2, B > 3, B > 4, C > 5, B > > ...and what I want is for my queries result to be > ordered by VALUE with C put first in the list, then A, > then B. > > Having investigated it appears that ORDER BY does not > seem to be any help as it restricts the ordering to ASC > or DESC. > ... I'm not sure, if I understood yor problem, but could the following be a solution: create table sort_table (sf int, value char(1)); insert into sort_table(1,'C'); insert into sort_table(2,'A'); insert into sort_table(3,'B'); select y.INDEX, y.VALUE, s.sf from your_table y, sort_table s where y.value = s.value order by s.sf; ------------ Gerhard