PeterWieland
Registered User.
- Local time
- Today, 12:52
- Joined
- Sep 20, 2000
- Messages
- 74
I take care of the portable appliance testing for several charitable organisations, as well as my own equipment. I want to move from paper Word document records, and thought it would fairly simple! I've designed some fairly complicated databases in the past (over 10 years ago!), but I seem to be stuck at the first hurdle.
The ultimate aim is to produce a monthly list of all equipment across all organisations (there are 7 of them) that is due for re-testing, and to enter test results straight into the database.
The first step is to produce an equipment inventory. This would be the basic information of make, model serial no. etc, how often it should be tested, last test date and which organisation owns it. So far so good. I have a table with all the fields I need, and an autonumber as a unique identifier.
Now the tricky bit. I also need to generate a second unique identifier (other than the key field) which is the number that goes onto the testing sticker. This will typically be a two letter identifier for the organisation e.g. PW for my equipment, TC for Theatre Club, followed by a sequential number.
ID PAT_ID
000001 PW001
000002 PW002
000003 TC001
000004 TC002
000005 PW003
Obviously each field has to have unique values, the values should be auto-generated, and a PAT_ID of a deleted record should never be used again.
Would it be better to have a separate table for each organisation's inventory? It seemed to me that all of the inventory should be in one table, but I can't figure out how to auto-generate the PAT_ID field.
The ultimate aim is to produce a monthly list of all equipment across all organisations (there are 7 of them) that is due for re-testing, and to enter test results straight into the database.
The first step is to produce an equipment inventory. This would be the basic information of make, model serial no. etc, how often it should be tested, last test date and which organisation owns it. So far so good. I have a table with all the fields I need, and an autonumber as a unique identifier.
Now the tricky bit. I also need to generate a second unique identifier (other than the key field) which is the number that goes onto the testing sticker. This will typically be a two letter identifier for the organisation e.g. PW for my equipment, TC for Theatre Club, followed by a sequential number.
ID PAT_ID
000001 PW001
000002 PW002
000003 TC001
000004 TC002
000005 PW003
Obviously each field has to have unique values, the values should be auto-generated, and a PAT_ID of a deleted record should never be used again.
Would it be better to have a separate table for each organisation's inventory? It seemed to me that all of the inventory should be in one table, but I can't figure out how to auto-generate the PAT_ID field.