I have a table that has a PK field with the following format:
Dyymm123. So that, a typical number might look like this D0806270.
The first character is literal and never changes. The next four digits
are derived by the year and month. The final three digits are the
sequential numbers given to units throughout the year. In the above
example, 270 would simply be the 270th issuance for this entire year.
The last three digits reset to 001 on the new year.
My question is what is the best way to automatically increment this
number so that the yy and mm numbers change with the calendar and the
last three digits increment by one each time an employee needs a new
number? And then, how do I reset the last three digits on the change
of calendar year?
Thanks for the help.
Troy Lee