DavidBrogdon
7 years agoQrew Assistant Captain
Best format for Unique Number Generation
I am in need of unique numbers for multiple different tables and am wondering what the best format is for the structure.
So far I know that I will need to track a letter to correspond to the table. I will also need to track a year, a month, and a constant four digit section containing the record Id, padded with leading zeroes.
My specific question is, for searchability, etc. Should I put the letter and/or date at the end or the beginning.
Example: Q18290001 vs 00011829Q ??
Any thoughts? Pros, cons?
Thanks for any advice.
PS, current code looks like this-->
"Q" & Right(ToText(Year([Quote Date])),2) & If(Month([Quote Date]) < 10, "0", "") & ToText(Month([Quote Date])) & Right("00000" & ToText([Record ID#]), 4)
So far I know that I will need to track a letter to correspond to the table. I will also need to track a year, a month, and a constant four digit section containing the record Id, padded with leading zeroes.
My specific question is, for searchability, etc. Should I put the letter and/or date at the end or the beginning.
Example: Q18290001 vs 00011829Q ??
Any thoughts? Pros, cons?
Thanks for any advice.
PS, current code looks like this-->
"Q" & Right(ToText(Year([Quote Date])),2) & If(Month([Quote Date]) < 10, "0", "") & ToText(Month([Quote Date])) & Right("00000" & ToText([Record ID#]), 4)