Generating unique ids

samia

Registered User.
Local time
Today, 21:52
Joined
Feb 19, 2004
Messages
51
Hello again,

I come back again with yet another three part question. I would like to be able to generate unique id for my database. Is it possible to do this using fields that exist in the database; say I've District, County, Parish and Village... that have codes as 01 01 01. I would like an id like 01-01-01-10 for the 10th record of the same category. 2ndly how bout if I wanted Kla-01-01-10 and lastly if I choose Mm-dd-10. Thank you in advance,

Raymond
 
If you have tables listing numbered districts, parishes, etc, then it should be fairly simple to look up the numbers and create the ID.

Question is (as always)... why would you want to? If the information you used to create the code is already in the table, then storing an additional field with a mixture of values in it might not be such a good idea.

Could you elaborate a bit on how your application will use these codes? If it's just to create a unique ID, the usual (and good) advice is just to use an autonumber.
 
Thank you so much Mike,

I guess we'll have to sit down and come up with this coding.

Thank you again,

Raymond
 

Users who are viewing this thread

Back
Top Bottom