-1

Currently the data is in Access but I can easily port to SQL.

We initially loaded data (say, fields 1-40 of various data types) but realized it was incomplete so we re-processed and loaded fields 1-75. Fields 3-40 should be identical between the two data sets.

We're trying to validate the re-processed records against the originally loaded ones and match them. Would it work to just bundle the common fields (3-40) into a hash and match on that or is it better to treat each field individually?

Or is there a better way entirely?

Thank you in advance.

analias
  • 51
  • 5
  • Possible duplicate of [Password hash function for Excel VBA](https://stackoverflow.com/questions/125785/password-hash-function-for-excel-vba) – Gustav Sep 04 '17 at 20:35
  • 1
    If you want to make sure all fields are equal between the two versions, why not just concatenate them and then compare them? Why hash? (Hashing is mostly used to make sure the original information can't be reused, it may be used for creating short identifiers, but that's mainly for files) – Erik A Sep 04 '17 at 20:38
  • Oh! I guess I just assumed that hashing-compare would be better than just concatenation (I have no reason why I thought that). I'll give that a shot. – analias Sep 04 '17 at 21:16

1 Answers1

1

I am not entirely sure what you are trying to achieve, but have you considered MINUS e.g.

SELECT field3, field4 .., field40 from table1 MINUS SELECT field3, field4 .., field40 from table2

Please don't hesitate to comment for any further clarifications.

Ted.

Ted at ORCL.Pro
  • 1,602
  • 1
  • 7
  • 10
  • 1
    While this may be valid for T-SQL and the OP says he can port it to "SQL" (I assume he means T-SQL), it surely isn't valid in MS Access since that doesn't support the minus operator. – Erik A Sep 04 '17 at 20:40
  • Oh interesting, I'm unfamiliar with MINUS. If it needs to go to SQL it will be SQL express 2014(?), not sure if that's supported there but I'll check it out. – analias Sep 04 '17 at 21:20