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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 How to generate new ID serie that remembers
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Danny Artavia
Starting Member

Costa Rica
2 Posts

Posted - 04/04/2013 :  13:02:48  Show Profile  Reply with Quote

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

Edited by - Danny Artavia on 04/04/2013 13:45:28

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 04/04/2013 :  14:27:12  Show Profile  Reply with Quote
sounds like what you need is a hashing algorithm for converting those id values

SQL Server MVP
Go to Top of Page

Flowing Fount of Yak Knowledge

6065 Posts

Posted - 04/04/2013 :  15:36:00  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000