As the title says, I need help with a database. I was recently brought on at a local automotive center to create an inventory of their warehouse, and design a database and management system that the employees could easily use.
Goals of the system:
Able to search by year, make, model, and engine model and display parts. This is the easy part and not the reason for my post. (well as of yet, I'm still in the process of setting up the DB and not implementing the query search yet.
Database is as follows:
[Part Number][Make][Year][Model][Engine][Parts Category][Description]
42611-10320|Toyota|1994|tercel|3E-E|BRAKES|Front disk brake rotor
Now it comes down to the model number in the post. It can be decoded and broken up. The first number for example:
The first half tells you what the part is. Within it, the first digit in the part number is general classifications -
0 - Special tools, service materials
1 - engine mechanical, air filters as well
3 - drivetrain, clutch etc.
4 - brakes
5 - interior trims
7 - interior trims, seat belt, restraint systems
8 - electrical stuff, switches, sensors, ECUs, etc.
9 - bolts, nuts, regular maintenance stuff
Therefore the part number from above, 42611-10320, the first number is 4, therefore it is brakes. I need the "Parts Category" field to reflect that first number.
So lets say if the first digit of a model is 7, the category field needs to read "Interior", and if its 1 it needs to read "Engine"
Could a if/or formula be used to read the first number of cell A1 (for example) and make F1 read the correct category?
I know this isn't a correct formula, but the idea is
If [first number of cell "Part Number"] = 1 then cell F = Engine
If [first number of cell "Part Number"] = 3 then cell F = Drivetrain
etc... Can this be done?