Re: Query Help - Mailing list pgsql-sql

From Yury Don
Subject Re: Query Help
Date
Msg-id 1593069435.20001227220107@vpcit.ru
Whole thread Raw
In response to Query Help  ("Brian C. Doyle" <bcdoyle@mindspring.com>)
List pgsql-sql
Hello Brian,

Wednesday, December 27, 2000, 9:20:53 PM, you wrote:

BCD> What do I have to do a query where information in table1 is not in table2

BCD> I am looking for something like

BCD> Select table1.firstname where table1.firstname is not in table2.firstname 
BCD> and table2.date='yesterday'

BCD> I tried
BCD> Select table1.firstname where table1.firstname != table2.firstname and 
BCD> table2.date='yesterday'

BCD> and that did not work just listed everyone....

If I understand correctly
Select table1.firstname from table1 where not exists
(select table2.firstname from table2 where table1.firstname = table2.firstname and
table2.date='yesterday')


-- 
Best regards,Yury                            mailto:yura@vpcit.ru




pgsql-sql by date:

Previous
From: "Francis Solomon"
Date:
Subject: RE: Query Help
Next
From: patrick.jacquot@anpe.fr
Date:
Subject: Re: Query Help