Search Postgresql Archives

Re: full join question...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux