Delete Query

Gootz11

Registered User.
Local time
Today, 20:30
Joined
Apr 5, 2002
Messages
47
I am currently running a query that selects 87 random records from a table, I want to run a delete query that takes those 87 records that came out in that query and deletes them from the original table so that they can't be selected again until the table is downloaded again... any ideas???
Thanks
J
 
One idea is to create a table TABLE1 by creating and running a make table query based on your "at random" query.

Next, create a delete query which deletes all rows from your original table which matches the rows in your table TABLE1.

RV
 
I had already tried doing that but get an error meassage that states "specify the table containing the records you want to delete" I tried to run the query several different ways but keep getting the same error. It doesn't seem to recognize 2 tables when you try to run a delete query.
 
Should work though.
Could be your SQL statement is not correct.
Post it so we can have a look.

RV
 
I know this statement is completely messed up but its all i have for now, i tried changing things all over but still can't get it to work

DELETE PICK.WHSE, PICK.POH, PICK.Pick, PICK.RESOH, PICK.RESERVE, PICK.TOTOH, PICK.TotalOH, PICK.RPK, PICK.PACK, PICK.CAP, PICK.REQ, PICK.PREV, PICK.SLOT, PICK.ITEM, PICK.DESCRIP, PICK.UPC, PICK.TI, PICK.HI, PICK.PKCAP, PICK.DAYSUPPLY, *
FROM PICK INNER JOIN [TBL - Pick Audit] ON PICK.SLOT = [TBL - Pick Audit].SLOT;


As you can see above all i want to do is to have all records that show up in [TBL - Pick Audit] be deleted from [Pick]
I know I need a WHERE statement in there but can't seem to find the right place for it. I'm just getting start with SQL so i apologize for my ignorance.
thanks
J
 

Users who are viewing this thread

Back
Top Bottom