RE: Query Help - Mailing list pgsql-sql

From Francis Solomon
Subject RE: Query Help
Date
Msg-id NEBBIFFPELJMCJAODNPKIEEJCEAA.francis@stellison.co.uk
Whole thread Raw
In response to Query Help  ("Brian C. Doyle" <bcdoyle@mindspring.com>)
List pgsql-sql
Hi Brian,

Try something like this:

SELECT firstname FROM table1 WHERE firstname NOT IN (SELECT firstname
FROM table2 WHERE table2.date='yesterday'::date);

Hope this helps.

Francis Solomon

>
> What do I have to do a query where information in table1 is
> not in table2
>
> I am looking for something like
>
> Select table1.firstname where table1.firstname is not in
> table2.firstname
> and table2.date='yesterday'
>
> I tried
> Select table1.firstname where table1.firstname !=
> table2.firstname and
> table2.date='yesterday'
>
> and that did not work just listed everyone....



pgsql-sql by date:

Previous
From: "Brian C. Doyle"
Date:
Subject: Query Help
Next
From: Yury Don
Date:
Subject: Re: Query Help