From: | patrick(dot)jacquot(at)anpe(dot)fr |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Query Help |
Date: | 2000-12-28 09:54:43 |
Message-ID: | 3A4B0DE2.A93C02AD@anpe.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
"Brian C. Doyle" wrote:
> 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....
imho the most natrural way for what you need seems to be :
select whatyouwant from table1 where not exists
select * from table2 where table2.firstname = table1.firstname and
table2.date='yesterday';
hoping that helps
P. Jacquot
From | Date | Subject | |
---|---|---|---|
Next Message | Jens Hartwig | 2000-12-28 10:55:02 | Strange Execution-Plan for NOT EXISTS |
Previous Message | Yury Don | 2000-12-27 17:01:07 | Re: Query Help |