If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Delete" issue
Performing a Delete query, I link 2 tables that have the same unique
information; example record 123 and record 123. I want to delete matching data from ONE table, but leave in the other. When I run the DELETE, an message box will appear and ask me to specify which table to delete from. I have the correct table selected, but it will not perform. I have worked around this in the past, by updating the items I want deleted with a "flag", and then doing a separate delete query. There has to be a better way!! Any suggestions? -- PattyD |
#2
|
|||
|
|||
Hi PattyD,
Please try it on a TEST MDB before actually do it on the really MDB. I have another way, for example if you Table Original and Copy. They have identical fields on both tables. You want to delete the record from Copy that you already have in Original. If both table have ID 123, you want 123 delete from Table Copy. This query will do it for you. delete from Copy.ID where Copy.ID in (select Original.ID from Original); This will remove all the records in Table Copy that have the same ID in both tables. Hope this helps. "PattyD" wrote: Performing a Delete query, I link 2 tables that have the same unique information; example record 123 and record 123. I want to delete matching data from ONE table, but leave in the other. When I run the DELETE, an message box will appear and ask me to specify which table to delete from. I have the correct table selected, but it will not perform. I have worked around this in the past, by updating the items I want deleted with a "flag", and then doing a separate delete query. There has to be a better way!! Any suggestions? -- PattyD |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DELETE query error message | HeatherD25 | Running & Setting Up Queries | 10 | October 23rd, 2004 08:26 PM |
completely delete office2000 | jason | Setup, Installing & Configuration | 1 | May 28th, 2004 10:08 AM |
Delete - confirmation required | Elfie | General Discussion | 2 | May 21st, 2004 05:51 PM |