I'm afraid you got to have a set of rules for these sequence numbers and I don't see you mention it somewhere.
So let me try to clarify it.
- You want them to be autoincreasing but have a standard prefix depending on customer's sex. Yes
- You want them to start from the beginning when date changes Yes
- They are no primary key or something like that so there can be duplicates. Yes
- Second part of the numbers has to have 4 digits, at least the rightmost of them not being zero. Yes
Are these rules
necessary and sufficient in math terms?
Doc sorry for the intrusion