I need a database from an Insurance company, but they don't want to give it becuase it has a column with the ID number of each patient and their medical history.
They will give it to me only if I can find a 'script' that allows them to switch that ID number, but I need to 'remember' each ID across all the dase...
If I have (in a column) the ID 12345 and you 54321, y must generate a new number for each one. It can be 1 for me and 2 for you; but each time it reads 12345 it has to change to 1 exclusively. In conlution, it has to identify each person with a new ID number.
Not sure I'm following what your trying to achieve. Are you saying that they will give you all the insured people and all of their medical records as long as you can't tell which medical records are associated with which people?
could an alternative be to obfuscate the external identifiers of the people like name, SSN, etc. Messing with primary key values may not be practical assuming the database has referential integrity set up.