pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <greg@turnstep.com>
To: pgsql-sql@postgresql.org
Cc: riya.verghese@admissioncorp.com
Subject: Re: ORDER records based on parameters in IN clause
Date: Wed, 29 Jun 2005 00:13:49 -0000
Message-ID: <937a483c3b3a9809ec978a24b9d9af76@biglumber.com> (raw)
In-Reply-To: <BBA4F47BB0CEDD4D8ADD2FE21E2823673110A4@dhost002-37.dex002.intermedia.net>


-----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-----





view thread (16+ messages)  latest in thread

Message-ID: <937a483c3b3a9809ec978a24b9d9af76@biglumber.com>
Permalink:  ../937a483c3b3a9809ec978a24b9d9af76@biglumber.com/
Also on:    postgresql.org/message-id/937a483c3b3a9809ec978a24b9d9af76@biglumber.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: greg@turnstep.com, riya.verghese@admissioncorp.com
  Subject: Re: ORDER records based on parameters in IN clause
  In-Reply-To: <937a483c3b3a9809ec978a24b9d9af76@biglumber.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox