X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 35F57529AC for ; Tue, 28 Jun 2005 21:13:55 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88669-06 for ; Wed, 29 Jun 2005 00:13:46 +0000 (GMT) Received: from biglumber.com (biglumber.com [207.228.252.42]) by svr1.postgresql.org (Postfix) with SMTP id DADEB529A1 for ; Tue, 28 Jun 2005 21:13:45 -0300 (ADT) Received: (qmail 4432 invoked from network); 29 Jun 2005 00:13:49 -0000 Received: from unknown (HELO localhost) (207.228.252.42) by 0 with SMTP; 29 Jun 2005 00:13:49 -0000 From: "Greg Sabino Mullane" To: pgsql-sql@postgresql.org Cc: riya.verghese@admissioncorp.com Cc: riya.verghese@admissioncorp.com Subject: Re: ORDER records based on parameters in IN clause X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: Date: Wed, 29 Jun 2005 00:13:49 -0000 X-Mailer: JoyMail 1.48 Message-ID: <937a483c3b3a9809ec978a24b9d9af76@biglumber.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.219 tagged_above=0 required=5 tests=AWL, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200506/346 X-Sequence-Number: 21947 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > when I say > select * from table where id IN (2003,1342,799, 1450) > I would like the records to be ordered as 2003, 1342, 799, 1450. Just say: select * from table where id IN (2003,1342,799, 1450) ORDER BY id; If that doesn't work, you will have to be more specific and send us the exact query. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200506282010 http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 -----BEGIN PGP SIGNATURE----- iD8DBQFCwedPvJuQZxSWSsgRAsC0AKD2UrMtQJ6RRxbeZ8J2n68ewRt+EgCeN2UP Qttr1dX9soeBp5HxIp+vz/c= =cGiG -----END PGP SIGNATURE-----