Re: Add: Special sort querstion

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: d(dot)piekarski(at)vivawasser(dot)de
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Add: Special sort querstion
Date: 2009-04-01 15:08:26
Message-ID: dcc563d10904010808p52118a7ah3ff78029b3a91c3a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Mar 27, 2009 at 6:10 AM, Dominik Piekarski
<d(dot)piekarski(at)vivawasser(dot)de> wrote:
> Oh, actually every row of the same id-range has the same start_lat/start_lng
> coordinates as the predecessors end_lat/end_lng coordinates. But the
> question remains the same. Is there a way to do something like ORDER BY
> (start_lat = end_lat AND start_lng = end_lng) ? Or maybe another way to
> achieve the same result?

Would something like

order by start_lat-endlat, start_lng-end_lng

OR

case when start_lat=end_lat AND start_lng=end_lng then 0 else 1 end

???

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Deirdre Hall 2009-04-01 18:17:30 Stored function not accepting null value?
Previous Message Dirk Jagdmann 2009-04-01 14:57:57 Re: Add: Special sort querstion