473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

3086 error on delete query

I created a database to visually compare pictures stored on a computer then delete the duplicate pictures from the computer. I imported the pictures into the Pictures table which has an ID field, an attachment field, and a hyperlink field containing the file location of the picture. After comparing the pictures, if they are the same, I append the picture to a table called DuplicatePictures which only has the ID and file path. The problem is that I want to delete these records from the Pictures table. I created a query in design view, here is the SQL for the query.

The brackets aren't working on my phone so I will use \ for open bracket and / for close

Expand|Select|Wrap|Line Numbers
  1. DELETE Pictures.ID, Pictures.*
  2. FROM Pictures, DuplicatePictures
  3. WHERE (((Pictures.ID)=\DuplicatePictures/!\ID/));
When I try to run the query, i get a 3086 error
Mar 22 '11 #1
1 2163
TheSmileyCoder
2,322 Expert Mod 2GB
Try:
Expand|Select|Wrap|Line Numbers
  1. DELETE Pictures.* 
  2. From Pictures Inner Join DuplicatePictures 
  3. ON Pictures.ID=DuplicatePictures.ID;
Also for future postings, always include the error description. I don't know all error codes by heart....
Mar 22 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Joe Del Medico | last post by:
I have two tables A & B and I want to delete all the records in A that are not in B. Can I do this in the query builder? It seems like a simple problem. I can easily find the records in A that...
5
by: Mike Wiseley | last post by:
I would like to create a delete query that consists of two tables linked together. One table will be the target for the deletions while the other table's equi-joins will tell the delete query which...
1
by: Mark Reed | last post by:
Hi All, I have a table with a date field and 6 number fields. The number fields are not in numerical order across the fields and I want number 1 to be the lowest number and number 6 to be the...
6
by: Mark Reed | last post by:
Hi all, Please help. I have a table with 2 fields of which I am trying to change a select query into a delete query. the select query is: SELECT Table1.Date, Min(Table1.Ball) AS MinOfBall...
0
by: hamking | last post by:
I'm trying to create a delete query from tableA that has the same records in the paste errors table. tableA has records that were previously inputed. New data coming in has information of old...
1
by: Simon Harris | last post by:
I'm using Access2000 and I've got a problem with a delete query which I'm *sure* I had working before )-: I have a table (logfile) which I import from an external source that has a load of stuff I...
3
by: Kevin M | last post by:
I have one table and have created a form from that table. Also, I have created a delete query. I want to but a button on the form which will delete all records from the table; however, I cannot get...
1
by: rdemyan via AccessMonster.com | last post by:
I'm getting an error on the following delete query, which says to "specify the table containing the records you want to delete." Here's the delete action query sSQL = "DELETE * FROM As A LEFT...
1
by: austin1539 | last post by:
-Access 2002 -Windows XP Pro Trying to run a DELETE Query to delete each entry in the table 'Data' where the field 'AssocID' matches the field 'AssocID' in the table 'Queries' and the date is...
0
by: Duke Slater | last post by:
I have a user who has created an Access 2007 database with one linked table to SQL Server 2005. He wants to purge the linked table and repopulate it, but gets the 3086 error when running a delete...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.