I'm trying to setup a delete query that cleans out the records in one table that are also in another table. I was trying to use the address field (would use name but one table splits it First and Last and the other doesn't) but I just can't seem to run the delete query when using a join
anyone have any ideas on how I could setup this delete query?
I have run the wizard to find all the duplicates according to one field.
So i have the results, except that some of the records contain nothing within the searchable field - so it returns all the records with nothing in the searchable field as duplicates.
How would i modify the query to perform the search but exclude the records with no data.
The SQL query below is the default wizard output for find duplicates, how would i change this??
SELECT Master.EMAIL, Master.MemID, Master.MEMBERNO, Master.FIRSTNAME, Master.LASTNAME, Master.POSITION, Master.ORGAN, Master.ADDRESS1, Master.ADDRESS2, Master.ADDRESS3, Master.ADDRESS4, Master.COUNTY, Master.COUNTRY, Master.POSTCODE, Master.SALUTATION, Master.MOBILE, Master.TELEPHONE, Master.WORKPHONE, Master.FAX, Master.RATE, Master.CLASS, Master.ADDREF, Master.DATEJOIN, Master.WEB, Master.Field26 FROM Master WHERE (((Master.EMAIL) In (SELECT [EMAIL] FROM [Master] As Tmp GROUP BY [EMAIL] HAVING Count(*)>1 ))) ORDER BY Master.EMAIL;
Another thing is, once i have the result... which query would i use to actually delete the duplicate data??
All I am trying to do is insert to have a form with a "Delete Record" button on it. The problem is I don't want anyone to be able to delete a record, I would like someone to have to insert a password to confirm the delete.
I have a query based on two tables, joined on one field (this field is the primary key in Table A. Table B doesn't have a primary key). When working inside this query, it gives me the option to delete records. However, when I try, the row disappears from the query but then if I save and close and either re-open table A or the resulting query, that record is back. It doesn't actually delete. If I go to table A directly and delete it, it's gone for good.
How can I make it so that when I delete the record inside the query it actually deletes? And if that's not an option, can I make it so that it doesn't seem like I can delete records inside the query so that people don't make the mistake?
I have two simple tables. I want to delete the records from Table1 that are on Table2. I've created a select query that gives me what I want but when I change to a delete query, I get this message: "Unable to delete from specified tables"
I think my problem has something to do with security but I can't figure out what to change.
I need a mechanism that takes the excel spreadsheet or table and determine if there are any new deal groups. (In this spreadsheet I allready have a deal group field) I will be using Book and DealGroup as combination primary key to compare against the table "8 -- YTD Principal Investments" which will hose the YTD numbers and serve as a historical table we will update throghout the year.If there is a new deal group the append into table "8 - YTD Principal Investments"
Please help with query/report. I have the following problem.
One student evaluates course before and after. There is several questions related to this evaluation (all are same before and after) and for one question there is 5 possible answer (stored in option group)
I would like to build a report or a query where I can compare data from each student (before and after) for all questions. Is this possible to do in access.
So, StudentA: questionOn: answer: one columen: before, second column: after…. Next question.
Hi there! I'm bulding this database where the user will have to insert a full phone number. What I would like to know is? if is there any way where Access can pick the first 5 digits of the number to compare with information already imputed in. by example if the user input the number 01942789789, access pick the number 01942 to look for a match? I know I could do with two diferents fields one for the code number and other for the number, but my boss only want one field. Is there anyone that could help me
I have a table that shows Part Numbers. Each part number can be listed multiple times depending on how man Build ID's it is associated to. Example: Part Nubmer 123456 could be associated with: Build Id's F187, A910, F001, C810, E010, C809 or it might only be associated to 1, 2, 3, 4,or 5 of those Build Id's. What I want my query to do is find any Part Number that is only associated with anything less than all six of the Build Id's. Example: Part Number 123456 is only associated with: Build Id's F187 & A910 or only F001 & C809 or only E010. If this was the case I would like for that Part Number to show up in the Query along with whatever Build Id's it is associated with as long as it is not associated with all six Build Id's. The Build Id Field is also part of the table.
I've made 2 tabels tblIn and tblOut, Now I want to make a query which get the differences between the number of product A in tblIn and the number of product A in tblOut the same for product B,.... It's possible that there is nothing in tblOut from product X so the query just has to show the number of tblIn of product X, I've tried a few things but i can't make the query can anybody help me???
I have two list's of names. I'm able to run a query to find the matches but the ones that don't match i also need to id? For ex. List a has 200 names List b has 130 names, how can i find the 70 names that don't match?
Have 2 Tables that contain the same information, one table was used during registration and had the Data changed
Question:
How do I pull a comparison query to match the registration table to the Main table and pull only the data that is different so I can update the main table with the new Information? :confused:
Hello, I would like to put a restriction on the SQL statement such that if one particular field contains the character "MO", then we take in the record, else we ignore them. May I know how could this be done in the "WHERE" part of the SQL statement? I do not think SQL would read things like Instr(). Thanks!
Hello all Ihave tblyear contain ( B_date and E_date ) in anoter form have feald ( invdate ) i wnat ( Invdate) is between B_date and E_date of the tblyear. Thank u
I need to campare two tables. if there are new records from table A would like to add it to table B. Also if there are any changes in a field of record i would like to see the change in table B. thank you Mark
My Access-table contains a Destination and Time field, i want to compare records for Time field with next records of same field.How can I do it..? Let me tell u an exp.. Time field is having a record like 06:23:45 AM for the destination - 'A', so i want to get all the records where the difference is upto 5 Seconds (i.e - 06:23:50 AM) and the Destination is same. It might be possible that there are one more records having time value 06:23:55 AM.
only problem is thats its writen at a bit too technicle a level from where i am. i've done some investigation into the problem though.
found out i need to use the docmd.transferdatabase function to import the tables i need to compare into my current db.
my question is this. how does it import them, does it create new tables within the current db or is it put somewhere in temp memory for use only while db is open, not sure how it would work. ideally i would like it to import tables, do the table comparison then create a report of the differences or make a new table showing the differences, then it reverts back to how it was before i imported it. i.e. he current databse is unchanged except for maybe a new report or new table (the results).
Is there a way to compare the value in one field with the value of the same field in the next record? I can do it in Excel by using the following formula:
=If(A1=A2,"Match","No Match")
But I need to be able to do this in an Access query?
I have a date field, ID field and a memo field (I have to have this memo field). I want to compare the memo fields by two certain dates and find out what doesn't match and if the ID field is blank. I have been trying with quaries but no luck.
I am not sure what forum this would fall under so I put it in general. feel free to move.
Is there a way do something like an intelligent string compare.
What I have is two tables. I need to find all matching record in both tables based solely on the name. However it is very common for minor spelling errors and punctuation differences to occur. e.g. 20,000 instead of 20000 or Name: Whatever instead of Name - Whatever Is there any way to do a string comparision on this sort of thing and return a liklihood of the strings being the same? Maybe a third party program that can be accessed via VBA? I must be able to control it by VBA as the program needs to be as automated as possible.
I know this may be asking too much but I would appreciate any input or ideas
I want to compare the database-structure of 2 Access databases. I have a database which is used for developing (added some fields, changed some field lengths, added some tables) and a live database.
Can I export the structure to some text-file of both databases, and use a compare-tool to see the differences? Or are there tools available for such compare job?
Hi, I need to compare 2 tables with Same Structure in a Database and pull out records that are not matching in both the tables. As anyone done similar task in Access 2002, if so please let me know how this can be accomplised.
I have two tables that have the exact same structure. They both started with the same data, but each were changed separately. (Two copies of the same DB, editted separately). I need to review the data in each record and determine what has changed or if records have been added. Is there an easy way for me to do this? (Note: Each record does have a primary key)