Re: full join question...

From: Niklas Johansson <spot(at)tele2(dot)se>
To: jonas(dot)f(dot)henriksen(at)imr(dot)no
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: full join question...
Date: 2006-04-05 15:26:06
Message-ID: 69326C39-3B87-44B4-883E-2B6E5509285D@tele2.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Nobis 2006-04-05 15:35:42 Re: Oracle outer join syntax
Previous Message Tom Lane 2006-04-05 15:01:09 Re: using initcap() for the French charater