![]() You could potentially end up with a lot of tables with differences that way: you would need a new table for every unique combination of columns with differences in it. Sorry if I wan't very clear in my first post and I hope this helps to clarify. If columns 4 and 9 in record 1 do not have equal values to the same columns in record 2 how do I keep only those two columns (and the ID) to insert into another table? Let's say there are 12 columns in the two records being compared. However, I need to keep only the columns that are not equal. WHERE a.empName b.empName or a.empSalary b.empSalary SELECT a.empID,a.empName,b.empName,a.empSalary,b.empsalary INSERT INTO tableC(empID, aName, bName, aSalary, bSalary) I've looked a INTERSECT and EXCEPT, but they return the both whole records.Ī small example, is this what you are looking for? Or something else - your question is not 100% clear. I could easliy do this in a VBA script or, dare I say.a CURSOR!!!!!!, but I'd like to see if there is a better way and keep this back on the server and out of the application. TableC does not need to be defined in the solution here. ![]() ![]() I want to keep these results and save them to a table (TableC). What I want to do is compare a record from each table by an uniqueID and retain only columns where the values are not equal. We have a double data entry process and want to compare the entries of one record in Table A to the duplicated entries in Table B (identical to TableA).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |