Re: Add: Special sort querstion - Mailing list pgsql-sql

From Scott Marlowe
Subject Re: Add: Special sort querstion
Date
Msg-id dcc563d10904010808p52118a7ah3ff78029b3a91c3a@mail.gmail.com
Whole thread Raw
In response to Add: Special sort querstion  (Dominik Piekarski <d.piekarski@vivawasser.de>)
List pgsql-sql
On Fri, Mar 27, 2009 at 6:10 AM, Dominik Piekarski
<d.piekarski@vivawasser.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

???


pgsql-sql by date:

Previous
From: Dirk Jagdmann
Date:
Subject: Re: Add: Special sort querstion
Next
From: "Deirdre Hall"
Date:
Subject: Stored function not accepting null value?