I am working with a table where customers have multiple days of service.
For example, a customer may be serviced 1, 3, and 5 (Monday, Wednesday, Friday). The problem is that there may be three records for that customer and in the "day" field, there will be a 1 or 2, etc. Of course, in some cases, there will be as many as six records per customer (123456), Monday - Saturday service.
What I need is a routine that will populate each of the three records with "135". This will let me know that the customer is service 3 x week and the service is Monday, Wednesday, and Friday.
The fields envolved are Custid (unique to the customer, but not to the table). There is the same custid for Monday, Wednesday, and Friday service.
Example
Custid day
10001 1
10001 3
10001 5
12001 1
12001 3
12001 4
12001 5
The results that I wish are as follows, whidh each line item representing a record:
custid day service_days
10001 1 135
10001 2 135
10001 3 135
12001 1 1345
12001 3 1345
12001 4 1345
12001 5 1345
Thanks in advance for your help,
Dobe
For example, a customer may be serviced 1, 3, and 5 (Monday, Wednesday, Friday). The problem is that there may be three records for that customer and in the "day" field, there will be a 1 or 2, etc. Of course, in some cases, there will be as many as six records per customer (123456), Monday - Saturday service.
What I need is a routine that will populate each of the three records with "135". This will let me know that the customer is service 3 x week and the service is Monday, Wednesday, and Friday.
The fields envolved are Custid (unique to the customer, but not to the table). There is the same custid for Monday, Wednesday, and Friday service.
Example
Custid day
10001 1
10001 3
10001 5
12001 1
12001 3
12001 4
12001 5
The results that I wish are as follows, whidh each line item representing a record:
custid day service_days
10001 1 135
10001 2 135
10001 3 135
12001 1 1345
12001 3 1345
12001 4 1345
12001 5 1345
Thanks in advance for your help,
Dobe