[AccessD] A2000: DELETE query with JOIN

Steve Erbach erbachs at gmail.com
Mon Feb 14 12:09:47 CST 2005


Gustav,

All right, I did a MakeTable query in which I concatenated all four
CAS fields into one (99.99.99.99). Called that T1. Then I did a
MakeTable query on the other table in which I concatenated the four
CAS fields into one. I called that table T2. Then I did a Delete query
like the one you wrote about...so I got it to work finally. But this
doesn't seem right. What's so bad about linking four fields between
two tables and wanting to delete the records from one that match the
records in the other?

Steve Erbach


On Mon, 14 Feb 2005 18:52:17 +0100, Gustav Brock <Gustav at cactus.dk> wrote:
> Hi Steve
> 
> I usually get away with creating a that selects the ID of those records
> not to be deleted.
> Then you can delete from the main table:
> 
>   DELETE *
>   FROM tblTable
>   WHERE
>     ID NOT IN (SELECT ID FROM qdyNoToBeDeleted;)
> 
> /gustav



More information about the AccessD mailing list