Delete Query Error

I'm trying to execute the delete query below, but Access keeps giving me an 
error that it "Could not delete from specified tables". It looks as though it 
might have something to do with the write access, but I know I've opened up 
the database for both read/write access. I've created/imported all tables 
myself. I'm not connected via ODBC at all. Does anyone have any suggestions?


DELETE Daily_Scrubbed.*
FROM Daily_Scrubbed INNER JOIN Daily_Scrubbed_Dupes ON 
Daily_Scrubbed.CHD_ACCOUNT_NUMBER = Daily_Scrubbed_Dupes.CHD_ACCOUNT_NUMBER;


0
Utf
2/7/2008 7:09:01 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
838 Views

Similar Articles

[PageSpeed] 20

Try
DELETE DISTINCTROW Daily_Scrubbed.*
FROM Daily_Scrubbed INNER JOIN Daily_Scrubbed_Dupes ON
Daily_Scrubbed.CHD_ACCOUNT_NUMBER = Daily_Scrubbed_Dupes.CHD_ACCOUNT_NUMBER;

IF that won't work then use a subquery in the where clause

DELETE DISTINCTROW Daily_Scrubbed.*
FROM Daily_Scrubbed
WHERE Daily_Scrubbed.CHD_ACCOUNT_NUMBER IN (
   SELECT CHD_ACCOUNT_NUMBER
   FROM Daily_Scrubbed_Dupes)


-- 
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"BBAL20" <BBAL20@discussions.microsoft.com> wrote in message 
news:D3DD0E3B-9CFE-44F8-B89C-F738AF039BFF@microsoft.com...
> I'm trying to execute the delete query below, but Access keeps giving me 
> an
> error that it "Could not delete from specified tables". It looks as though 
> it
> might have something to do with the write access, but I know I've opened 
> up
> the database for both read/write access. I've created/imported all tables
> myself. I'm not connected via ODBC at all. Does anyone have any 
> suggestions?
>
>
> DELETE Daily_Scrubbed.*
> FROM Daily_Scrubbed INNER JOIN Daily_Scrubbed_Dupes ON
> Daily_Scrubbed.CHD_ACCOUNT_NUMBER = 
> Daily_Scrubbed_Dupes.CHD_ACCOUNT_NUMBER;
>
> 


0
John
2/7/2008 7:55:45 PM
Reply:

Similar Artilces:

How to Recover Deleted Sent Mail?
While trying to delete very old "Sent" mail I seem to have deleted all "Sent" mail. Is there a way of recovering this mail? Have you closed Outlook since deleting the old sent mail? http://www.howto-outlook.com/howto/restoredeleteditemsfromanoutlookpst.htm might help. Next time, archive the items you want removed from your active .pst file. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, Sidney Friedman as...

Error 8004000
I am constantly getting "Error 8004000" Line 40 Char1 expected statement with my script and can't figure out why. 'Logging Option Explicit 'Declarations Const LOGFILE = "c:\SysAd Tools\Logs\UA.log" Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 'Open and write to the end of log Dim ComputerName Dim oFSO Dim strComputer Dim strComputerName Const HKEY_LOCAL_MACHINE = &H80000002 Dim WshShell Dim oReg Dim strKeyPath Dim subkey Dim arrSubKeys strComputer = "." Set oFSO = CreateObject("Scripting.FIleSyst...

Cannot delete subreport
I am using Access 2003 and have a report I did a while back with a simple subreport. I want to remove the subreport but for the life of me can't figure out how to do it. Any help would be greatly appreciated. Thanks. Hi - When you say "remove the sub report", what do you mean? Do you want to delete the entire subreport control containing the subreport, or do you want to keep the control, but change the report contained in it? The first is easy - select the control by clicking once on it once, then press delete. For the second, click the control once, then set ...

Getting an error in my xml schema editor code.
Hi, I have an xsd file like this. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="generic" elementFormDefault="qualified" targetNamespace="generic"> <xsd:element name="bookstore" type="bookstoreType"/> <xsd:complexType name="bookstoreType"> <xsd:sequence maxOccurs="unbounded"> <xsd:element name="book" type="bookType"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="bookType&q...

Rule for Deleted Items
I am being told that there is a rule in place on my Exchange server that will not empty the deleted items folder every 30 days for certain users in my organization. I found a recipient policy in System Manager that says "Users Excluded from Mailbox Cleanup" but it only shows 2 users and not the 3 I was told about. But I have confirmed that the missing person has email in her deleted items folder going back to 2005 so it must be working. Is there any other location I should be looking? Also, we just had someone come in and migrate our Exchange environment from 2000 to a new...

ODBC DSN query issue
I've researched this to death, and many sources point to the same answer, yet I keep getting the DSN prompt box when I try to run a query with the user ID & pw imbedded in the query. (I'm trying to get passed needing to manually enter a password when I run a Scheduled Task. - My system is set up that I do not have the option of saving a password.) This is what I have in the Source Connect Str ODBC;DSN=edwprdi0;UID=xxx;PWD=xxx; When I run as a pass-thru, I just get the prompt asking for a DSN SELECT ARMUV006.LEAD_CAR_INIT, ARMUV006.LEAD_CAR_NBR FROM ARMUV006 IN &...

cannot delete message from deleted items
I have a message in my deleted items folder that when choosing delete opens the McAfee box warning of potential virus and wants me to choose open or do not open, but will not delete. I have tried choosing another file and holding ctrl and choosing the file I want deleted and then choosing delete, I have tried moving it to the desktop but it will only copy there, I have tried every form of delete possible. I need help. Anyone know how? Outlook 2002. Can you empty the deleted items folder entirely? Or turn off the McAfee scanning temporarily to see if it makes a difference? Julie wr...

I can not delete a duplicate personal folders list #2
Vall... amazing that there isn't an easy fix for this. The instructions provided simply don't work ( tools-email accounts-view change email accounts-deliver to new account-finish-close outlook and reopen ), and none of the other offered explanations have worked either. As this is such a common problem; why hasn't microsoft provided a very EASY fix? I am more confused ( and frightened ) and don't want to make the problem worse! Your profile is corrupt, probably based on an incorrect migration of your ..pst file. Create a new mail profile and configure it to use your exi...

Retrieval of Deleted Items After Being Deleted from the Deleted Items File
I deleted a number of important emails from the deleted items file in Outlook 2000. This may sound stupid, but I completely emptied the deleted items file instead of deleting them one by one. Pretty stupid, huh. Anyone. Can they be retrieved? Please help. Thanks. Sorry for sending this again but I seem to be computer illiterate and it has taken me some time to explain the whole situation. Thanks again. unless you use Exchange server with deleted retention enabled, you are most likely out of luck, but you can try something that might help.... http://www.outlook-tips.net/howto/r...

Unknow dictionary error
Monday morn Last night I copied the server's "shared documents" folder to another disk in the server. And shared it as "Shared Documents." This morning, from the GP's client computer, the "Unkown Dictionary" error message is display when attempting to log in. I moved the MSBS folder back to the original location, shared the original "Shared Documents" folder as "Shared Documents" and provided sharing permissions. The security permissions had not changed. I have rebooted the client machine. Still the error is displayed. Guidan...

Exchange Restore Error
I'm in the process of performing some disaster recovery testing and I've run into a problem with restoring our site's Exchange 2003 servers. I first restored the system Windows 2003 Server server, and then the Exchange Server storage groups, ensuring the "Last Restore Set" and "Mount Database After Restore" options were checked. The NTBackup portion of the Exchange restore completed without errors, but the mailbox and public folder stores won't mount. The Event Log reports a "ESE BACKUP event 903" error with the text "Information Sto...

Delete macros
I am using Excel 2002. When I click on Tools->Macro->Macros... i see 2 macros. The problem I am having is that I can't delete these macros, the delete button to the right is grayed out. How can I delete these macros? Hi maybe the macros are protected. Try hitting ALT + F11 to open the VBA editor and try to delete the macros / modules there -- Regards Frank Kabel Frankfurt, Germany excel777 wrote: > I am using Excel 2002. When I click on Tools->Macro->Macros... i see > 2 macros. The problem I am having is that I can't delete these > macros, the delete button to ...

Error mapi session Exchange 2003
We have this problem in our Exchange infraestructure, and i don't find the solution the error is this one: Mapi session "/o=First Organization/ou=First Administrative Group/cn=Recipients/cn=XY" exceeded the maximum of 32 objects of type "session". Anyone could give me a idea about what problem have we got?. Thank you Jonatan Sancho Jonatan You might want to look at these KB's: http://support.microsoft.com/?id=830836 http://support.microsoft.com/?id=830829 -- Mark Fugatt Microsoft Limited This posting is provided "AS IS" with no warranties, a...

Recovery Storage Group error when trying to add database #2
Can you please tell me where I would make the change to the DN as described below? Hi, The problem is that in the distinguished name of the database there is a single parenthesis without its match. Examples of this would include: cn=Mailbox Store 1 (SG1,cn=First Storage Group,.... cn=Mailbox Store 1 (SG2),cn=Second Storage Group (TestServer,cn=... If you add the closing parenthesis and force replication of the Active Directory the "Add Databases to Recover" dialog should work properly. The problem is the LDAP request that is sent to the Domain Controller to render ...

Struggles with an update query ;(
Hi There, I would really appreciate some assistance, I am designing a database (low key) but I am trying to get my face known in an org (nothing to do with database thank goodness!) but I volunteered to do this database and have hit a major snag and I am not prepared to accept defeat. So this is my issue, if there is a lifesaver out help ! ;) So this is what I have at the moment. 1) A personal detail type records table 2)An evaluation form for projects attended. 3) What they would like is that when indivduals attend a project the project name is updated in the details form under "...

Report Query in RMS
Is there somewhere that I could get some information as to how the reports in RMS are composed. When you look at the various reports they all seem fairly simple in there basic structure. Are the any examples of how these reports are composed. The //--- Columns ---// iformation seems to be the same in most reports, same as the //--- Title Rows ---//. Setting up the flitters and the TablesQueried I need to understand. I have the schema for 1.2. How do I better understand the following or what do I need to learn. I wish I was in college again and had all the time in the world. //--- Repo...

deleting email in outlook, freezes before i can delete
i have a file with pics that symetec scanner says is to large. i can receieve email but cannot send any. it freezes before i can delete and says non responding. Hi All, I want to re-raise the old issue of Fax numbers showing up in the Outlook Address book when one is sending an email. I know that this can be stopped by prepending the Contact's fax number with a letter so that Outlook doesn't see it as a valid fax number and therefore doesn't list it. What's always puzzled me, however, is that this fix doesn't work if the fax numbers are changed using an export to CSV...

OK to delete Deleted Items folder?
I'm afraid I'll have to delete my Deleted Items folder in Outlook 2000. When I try to empty the folder I get a "The messaging interfce has returned an unknown error. If the problem persists Restart Outlook" message. Is it possible to delete the entire folder and replace it with an empty new one? Will it create any problems? TIA Henrik Not possible. Run scanpst.exe against your pst-file to scan it for errors first. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Se...

Run time Error '1004
I have a macro to run right before the workbook closes. It is as follows: Private Sub Workbook_BeforeClose(Cancel As Boolean) Range("A1").Select ActiveSheet.ShowAllData ActiveWorkbook.Save End Sub The top row has the autofilter on. If the data is not filtered then when the macro runs it throws a Run Time Error '1004'. If it is filtered the Macro runs fine. I can't seems to find the right code to get the macro to end if it errors out. I think it would be an if then statement but my coding skills aren't quite up the par. Any help would be great. Thanks in adva...

Re: Ranking my results in a query to get the TOP#10 percent
Hello, I have created several queries and now I would like to rank my result to only get the TOP 10 percent. Could you please assist me with an Access SQL statement that can accomplish this? Thanks, TL SELECT TOP 10 PERCENT * FROM somewhere ORDER BY someExpression It is not a 'rank' in itself, though, just a pick of the 'top most'. Light difference between the two expressions, but it probably does not matter... :-) Vanderghast, Access MVP "TL" <TL@discussions.microsoft.com> wrote in message news:E6549C8D-9FDC-4568-B73F-434BAF601BD7@mi...

Very difficult query!
Hello All I have spent most of today on this and can't get it right: I hope someone out there can help! I need a query that will give a person's retirement date (RD), according to their date of birth (DOB). The trouble is that the age at which a person can retire is not constant, but is instead determined according to the following: for a DOB earlier than 6 April 1950, the RD is on their 60th birthday If DOB is 6 April 1950 to 5 May 1950, RD is 6 May 2010 If DOB is 6 May 1950 to 5 June1950, RD is 6 July 2010 If DOB is 6 June 1950 to 5 July 1950, RD is 6 Sep 2010 If DOB i...

Spell Check Error OL 2003
Has anyone seen or heard of any problems with spell checker in Outlook 2003? ...

How to delete chart
I created a histogram and want to delete it. I select it and the faint double border apperars. There are no square handles like in 2003. Then I press the Delete key. The faint double border goes away replaced by a single thin black border. The chart is still there and is not able to be selected at all. I entered "delete chart" in the Excel Help window, and there was nothing at all on deleting a chart. Ditto for "remove chart." I got no help searching on the internet either. I have Excel 2007 and Windows XP Professional When the border changes, can you press Delete a...

error on save with Access 2002
Access cannot save changes to dependant OLE object. (Direct translation of the Spanish error message) When trying to save record that has a field linked to a .pdf file. It works on Access 2K and not for Access 2K2 users Translation of error message continues: You have no permissions to write to log where object is stored or log is locked by another user Any idea how to fix this? ...

error messege
please can anyone tell me how to fix this. An error occurred trying to initialize internal data for the newsgroup 'Bulk Mail' on the account 'Hotmail'. just started since i downloaded updates. ...