ordering by multiple columns - Mailing list pgsql-sql

From Pablo Barrón
Subject ordering by multiple columns
Date
Msg-id d4d13b4c0703140850i4957116bw8a25255131a56346@mail.gmail.com
Whole thread Raw
Responses Re: ordering by multiple columns  (Andreas Kretschmer <akretschmer@spamfence.net>)
Re: ordering by multiple columns  ("Rodrigo De León" <rdeleonp@gmail.com>)
List pgsql-sql
<br /> Hi!<br /><br /> I'm trying to order a list in which the first parameter to order is a specific field, and the
secondshould vary depending on a specific condition. More explicit, I would like to do something like:<br /><br /> -
ORDERBY a.column1, [b.column2 if c.value != 19 || c.column2 if c.value==19]<br /><br /> That is to say, use a column if
avalue on each row isn't 19, OR use a different column if it isn't. How could I solve this? I've got to have a global
orderover my query, so I cannot separate it into two queries, etc :-? <br /><br /> Thank you!<br /><br /><br /> 

pgsql-sql by date:

Previous
From: Wiebe Cazemier
Date:
Subject: Joins on many-to-many relations.
Next
From: Andrew Sullivan
Date:
Subject: Re: import CSV file