Results 1 to 3 of 3
  1. #1
    HeadGasket's Avatar
    HeadGasket is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2011
    Location
    Sonoma County, Northern California
    Posts
    33

    Delete records from a table: Use Find Dups Query & Delete or not?

    I have a new database that contains a table called Table_PartNumbers. It contains a list of all the part numbers with all of our customers. In my initial data entry I accidentally duplicated 4 part numbers.



    Can I just delete the records from the table (select then delete) or should I get rid of them by creating a Find Duplicates Query, convert it to a Delete Query and take care of them that way?

    At this point nothing bad will happen to my database if I just click and delete the 4 extra records. All the part numbers have a unique ID and the database is so fresh that there aren't any records in any other tables that reference the duplicates.

    But, since I'm trying to learn 'proper' technique this go around, I was wondering what proper steps should be followed?

    I found this link below but I just don't quite understand if this something you always want to do or it is okay to just delete records if there is no chance of database corruption?

    https://www.accessforums.net/access/...ete+duplicates

    Thanks.
    Last edited by HeadGasket; 01-24-2012 at 02:16 PM. Reason: Solved

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    The relationships in your database should be strictly set up - ALWAYS enforce referential integrity. That way no records such as these can be deleted if there are any connecting records on any other tables. It sounds as if in this case there are no other records, but if there were and you have strict referential integrity then Access wouldn't allow you to delete them anyway.

    Also, as this is a one-time fix, I wouldn't waste time writing a query and then testing it to see if it works, etc. Much safer and quicker to delete the records manually. Correct procedures are only needed for permanent routines and tasks - your logic is quite sound on that and you have the right way of thinking.

  3. #3
    HeadGasket's Avatar
    HeadGasket is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2011
    Location
    Sonoma County, Northern California
    Posts
    33
    Thanks. I was hoping that was the case.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 01-24-2012, 06:19 PM
  2. Trying to Delete record using delete query
    By MooseOTL in forum Access
    Replies: 13
    Last Post: 10-04-2011, 02:30 AM
  3. Replies: 11
    Last Post: 03-30-2011, 01:08 PM
  4. Replies: 1
    Last Post: 04-29-2010, 05:22 PM
  5. Delete all records in a table?
    By bob646 in forum Access
    Replies: 1
    Last Post: 05-20-2007, 11:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums