I want to assign a unique number ID to a product based on the type of product it is.
Product Type Product Type Number Unique Identifier Range
General 972 19216872100 through 19216872150
Bakery 1274 19210240100 through 19210240150
Produce 12373 19211246100 through 19211246150
Meats Due to the expense of meats they need to be tracked on a finite scale
Problem 1: The record has already been tagged with the appropriate product type code by the store manager. Each product type should be assigned a unique ID number from a list of unique ID numbers and no two of the same products can use the same unique ID number in a product type. The list of unique ID numbers is different for each product type. Of course, this has been scaled down due to the fact that there can be thousands of products in a grocery store.
Problem 2: This problem is similar in form and function to Problem 1 just re-used for a smaller scale. Each meat type is coded for a particular meat type. This is also coded from a fixed range of unique IDs identified by the store manager. Again, no two types of packages of meat shall have the same unique ID and they must from the proper Sub Product Type. This is important since this will track the meats. Of course, this has been scaled down due to the fact that there can be thousands of packages of meat.
Product Type Sub Product Type Unique Identifier Range
Meat Deli 1 - Chicken 192128253-1 through 192128253-50
Meat Deli 2 - Beef 192128253-51 through 192128253-100
Meat Deli 3 - Pork 192128253-101 through 192128253-150
Meat Deli 4 - Lamb 192128253-151 through 192128253-200
Meat Deli 5 - Fish 192128253-201 through 192128253-250