We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


Key code situation

Medium Priority
Last Modified: 2010-04-23

   I have an application that have many many tables with data all references by a code key for example the passport number, What i need from you is some idea to confront with the next situation.

   If a person comes tomorrow and tell me that that passport number is incorrect how can i do to chane the reference to that person with the less work popssible.

  For example creating a duplicate record in the main table refering the old pasport numberand the new one.

The best idea get the reward :)
Watch Question


I would have 2 Columns holding the info

UniqueID - Which holds the Identity (increments with each number)
PAssportID - An ID thats changeable

OF course through your whole program you will use the UniqueID but for the Interface you will show the PassportID
Alfredo Luis Torres SerranoASP .Net Developer


Yes bu the problem here is that i have data that i need to be refereced to the new passprt id, that is i have a lot of documents with the old ID. How do my interface will now that the old documents belong to the same person?
Alfredo Luis Torres SerranoASP .Net Developer


Never mind forgot that, The problem is that i have a lot of tables referenced with the document number´'Passport id' and a table with the unique id and the passport and other tables that mae reference to the id.

How can i change the passport without having to change all the tables

you would have to create a Batch Utility where you would go through all the tables and change the id

Update Tablename set PassportID = (Select UniqueID FROM MasterIds WHERE PID = PassportID)
Alfredo Luis Torres SerranoASP .Net Developer


Thanks mike but i found the correct solution that was.

     Duplicate the master record with the new passportid hold in a var the old passportid, the new one and the id assigned to it, later i will replace in the conextion table the id with the new passportid.

Godd Hunt :)
Closed, 250 points refunded.
The Experts Exchange
Community Support Moderator of all Ages

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.