Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 How to generate new ID serie that remembers

Author  Topic 

Danny Artavia
Starting Member

2 Posts

Posted - 2013-04-04 : 13:02:48
Hello!!!

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...

For example,

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.

Thanks !!!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-04 : 14:27:12
sounds like what you need is a hashing algorithm for converting those id values

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-04-04 : 15:36:00
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.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -