Re: Need help with a query
From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: 1998/03/25
Message-ID: <6f9rft$otu_at_bgtnsc02.worldnet.att.net>#1/1
Date: 1998/03/25
Message-ID: <6f9rft$otu_at_bgtnsc02.worldnet.att.net>#1/1
On Mon, 23 Mar 1998 16:19:09 -0600, dwarakv_at_hotmail.com wrote:
> I have two tables A and B. I need to delete those records from table A
>which match records in Table B. The description of the two tables are
>
> Table A Table B
>I_id Number E_id Number
>I_date Date E_date Date
Assuming that ID and DATE are the keys, you could do something like this:
delete from table_a where exists ( select * from table_b where table_a.l_id = table_b.e_id and table_a.l_date = table_b.e_date )
Jonathan Received on Wed Mar 25 1998 - 00:00:00 CET