Skip site navigation (1) Skip section navigation (2)

Re: Order by sub-select

From: "Daniel T(dot) Staal" <DStaal(at)usa(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Order by sub-select
Date: 2008-01-09 18:09:44
Message-ID: 62262.63.172.115.138.1199902184.squirrel@MageHandbook.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Wed, January 9, 2008 12:39 pm, Rodrigo E. De León Plicet wrote:
> On Jan 9, 2008 12:12 PM, Daniel T. Staal <DStaal(at)usa(dot)net> wrote:
>> How would I sort the result by eforward.partner.ibx?
>
> Try (untested):
>
> SELECT DISTINCT name, contact, phone, email
> FROM            eforward.address
>                 JOIN eforward.ibox
>                 ON eforward.address.gsb = eforward.ibox.gsb
>                 JOIN eforward.partner
>                 ON eforward.ibox.ibx = eforward.partner.ibx
> WHERE           eforward.partner.pibx = 'MTCBIN'
> ORDER BY        eforward.partner.ibx;

Thanks.  'DISTINCT' gives an error then, but that doesn't happen to be a
problem in my case.  (If it was, I could probably figure out a way to
include ibx in the final output...)

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------


In response to

pgsql-novice by date

Next:From: Michael SmithDate: 2008-01-09 22:01:17
Subject: Re: Creating a tablespace on an external server inWindows
Previous:From: Rodrigo E. De León PlicetDate: 2008-01-09 17:39:26
Subject: Re: Order by sub-select

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group