I have been tasked with implementing a new Part Number Generator. I have done simple databases with not a problem. This one is pretty big.
What I need to do is generate a part number based on choises a user selects.
Our part numbers look like this
XX-##-##-####
The XX is a prefix this determines wether the part is hydraulic or electronic
The first ## - is a series number 01 - 10 (Pumps, Valves,etc...)
The second ## is a detail number 01-20 (Usually a vendor or type of product (Say its a pump detail would be Centrifugal))
and the last four #### is a sequential number. (is the next number in the series for unique products)
Ex: HY01010001 = Hydraulic - Pump - Centrifugal - Seq num (basiclly pump 1)
HY01010002 = Hydraulic - Pump - Gear - Seq num (basiclly pump 2)
EL01010001 = Electronics - Control - Harness - Seq num (basically controller #1, harness #1)
So on and so on.
I have a table setup for the prefix and a second table that contains the series number and desc, a third that holds the detail number and desc. I'm stuck on the seq number part.
The reason I'm stuck is because each part number will have a different sequence. How do I ensure that HY01010002 goes up to HY01010003 and that EL01010001 goes to EL01010002?
If I have confused please let me know - I will try to clarify.
Thanks for reading,
Sean
What I need to do is generate a part number based on choises a user selects.
Our part numbers look like this
XX-##-##-####
The XX is a prefix this determines wether the part is hydraulic or electronic
The first ## - is a series number 01 - 10 (Pumps, Valves,etc...)
The second ## is a detail number 01-20 (Usually a vendor or type of product (Say its a pump detail would be Centrifugal))
and the last four #### is a sequential number. (is the next number in the series for unique products)
Ex: HY01010001 = Hydraulic - Pump - Centrifugal - Seq num (basiclly pump 1)
HY01010002 = Hydraulic - Pump - Gear - Seq num (basiclly pump 2)
EL01010001 = Electronics - Control - Harness - Seq num (basically controller #1, harness #1)
So on and so on.
I have a table setup for the prefix and a second table that contains the series number and desc, a third that holds the detail number and desc. I'm stuck on the seq number part.
The reason I'm stuck is because each part number will have a different sequence. How do I ensure that HY01010002 goes up to HY01010003 and that EL01010001 goes to EL01010002?
If I have confused please let me know - I will try to clarify.
Thanks for reading,
Sean