AnsweredAssumed Answered

How do i...create unique numbers in a specific format?

Question asked by LightningAd on Dec 3, 2008
Latest reply on Dec 19, 2008 by gidgetgirl


How do i...create unique numbers in a specific format?


I'm completely new to database creation, and i'm trying to develop a system to help me in my job and learning as i go! (Fool i hear you cry).


Because i am trying to build a system to catalogue TV commercials, which are all identified with specific 15 digit alphanumeric codes, i need to figure out how to create these.


the code is in the format  XYZ/ABCD000/999    where XYZ is the agency id code, ABCD is the product identifier, 000 is a 3 digit number  and 999 equates to the duration of the ad so a 20 sec ad equals 020, a 40 sec = 040.


I need to be able to generate a new code for each ad, but as i have recently passed the 999 point on my clock numbers i need the system to be able to use digits 001-999 then start again, but to also compare the first 12 characters of the code to ensure that each one is unique.


Please can someone point me in the direction i should be headed with this one?

I know i have probably bitten off more than a newbie can safely chew, but else do you learn?


thanks in advance