Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to reverse Appended query, true Access skills to figure this one

Status
Not open for further replies.

Davefeet

Technical User
Jan 24, 2002
212
0
0
US
I appended 184 rows to a table, in retrospect, i didn't want to do that. now those records are in a databse 7,000 big. Is there anyway to search the database and delete those records. I don't have the time to go through the whole database trying to find them. I need some serious expertise to solve this puppy. Any way to search records according to when they were updated. I do not have a backup!!!

In need of some help.
Dave SLC: Olympics 2002, Great skiing, Great Symphony, Great Weather, Great Community, was rated as one of the best places to raise kids.
 
If the table has an auto number field and the records were appended in 1 query then they will be all grouped together. Also, they are probably all on the end of the table if no new records were inserted. Open the table and check it out.
 
Take the append query and change it into a delete query (assuming that there is some way to identify the appended records).

If you have no way of identifying the appended records you might want to try to copy the table and remove all indexes and keys and sorting. I believe the appended records will be at the bottom. (At least I think they will be, but I'm not sure)
 
No auto number fields, they have as their key SSN.
Also when you open it up it A->Z names.

SLC: Olympics 2002, Great skiing, Great Symphony, Great Weather, Great Community, was rated as one of the best places to raise kids.
 
What kind of criteria were used in the append query or did you empty one table into the other?
 
emptied one table (3 columns) into another table (7000 records, with about 20 columns, all indexed interrelated and...).

ANy other Ideas?
I removed indexing and key and sort, but no luck.


I have the table that I appended, is there a way to delete only those records that apear in the table i was appending?

hmm

Dave
SLC: Olympics 2002, Great skiing, Great Symphony, Great Weather, Great Community, was rated as one of the best places to raise kids.
 
assuming ssn is unique.

Delete from appendedtable
where ssn IN (select ssn from deletedtable)
 
Your original post leads me to believe that you track the last updated date of each record? If so, run a delete query that combines SSN number and updated date as criteria.

Good Luck.
 
thanks for all the help, I figured it out.

THanks
DAve


I ended up going through and just deleting the records, it took a while (1hr) but ohwell/

THanks for all of the help.
SLC: Olympics 2002, Great skiing, Great Symphony, Great Weather, Great Community, was rated as one of the best places to raise kids.
 
Since you still have the original table that you appended, what you could do is run a "Find Unmatched" query on the two tables. This would find all the records of the main table that were not appended from this table. Then export those using a Make-Table query to recreate the table without the appended records.

HTH
Lightning
 
but then how about going the next step. consider what happened. then consider the failability of the human element (you?). now, look through the advice given above and decide what you (the failable human element) could do NOW to make the next occurance easier to deal with. AutoNumber (or some variation) could help. A Date/time created field could help ...

inactivity will not help.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top