Retrieve rows that have specific value in any of columns.

From: Lukasz Brodziak <lukasz(dot)brodziak(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Retrieve rows that have specific value in any of columns.
Date: 2013-08-12 07:12:36
Message-ID: CAGWYGjUJRvjMEJ7KXu17v9qu7hvZ=-JgyqQHXp9a=0_EPjfYJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello,

I have a table which contains 5 columns the last 3 indicate wether the
employer worked with given project or not. The values are simply Yes
and No. What I need is a list of people who haven't worked in at least
one project.
So for example we have data:

John Smith Yes No Yes
Tim Robins No No Yes
Joe Bar Yes Yes Yes
Ben Finch Yes No No

So the SQL statement should retrieve: Finch,Robins and Smith.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Albe Laurenz 2013-08-12 07:15:06 Re: Retrieve rows that have specific value in any of columns.
Previous Message Christian Ullrich 2013-08-12 06:37:52 Re: Request for help