From: | "Jonas F(dot) Henriksen" <jonas(dot)f(dot)henriksen(at)imr(dot)no> |
---|---|
To: | Niklas Johansson <spot(at)tele2(dot)se> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: full join question... |
Date: | 2006-04-05 16:37:26 |
Message-ID: | 1144255046.4813.52.camel@nmd8441-2 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
ehh, sorry, yes, I also want to retrieve other values from the table,
but I left them out for clarity (which made it maby less clear...).
Maybe it makes more sense if you define the table as
CREATE TABLE testtable (
depth integer,
measuretype integer,
operation integer,
value float
);
...where I'm actually interested in the value...
Jonas:))
On Wed, 2006-04-05 at 17:26 +0200, Niklas Johansson wrote:
> On 5 apr 2006, at 16.39, Jonas F. Henriksen wrote:
>
> > Hi,
> >
> > I'm working with postgres and I have a question regarding a self-
> > join on
> > my table (se below for table definition and testdata):
> > I want to retrieve all depths that have either a measuretype=1040 or a
> > measuretype=4001 or both.
>
>
> > All help apreciated (hope you understand what I want to do...),
>
>
> Not sure I understand why you need a join... You say you want to
> retrieve all depths that have certain measuretypes. Wouldn't the
> following query do?
>
> SELECT DISTINCT depth FROM testtable WHERE measuretype IN (1040, 4001);
>
> Is there anything else you need from the query as well?
>
>
> Mvh,
>
> Niklas Johansson
> Tel: 0322-108 18
> Mobil: 0708-55 86 90
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2006-04-05 16:39:55 | Re: Why postgres install requires physical access to |
Previous Message | Andrus | 2006-04-05 16:28:05 | could not create shared memory segment in Windows XP |