Sorry if this is too basic a question for this forum. My CR education is limited to just one CR level 1 class (2 days), and that was many years ago (I think CR 9 was just coming out). I don't use it often but have been charged with creating a report for work and am stumped. It all sounds like it should be rather easy.
I have two fields in my DB that contain numerical codes that represent the types of services that we provided to our customers. I think the field is actually a string field, but the front end users enter a number to represent the service (1-9). I'll just call the fields service1 & service2. Most of the service2 fields contain no data.
What I need to do is to count all the service that were paid in a week (which is just a matter of counting the records). But I don't want to include the records that have two service codes (indicated by a value in the service2 field)in which one of the two fields contains the value 8 (representing a free service that was not charged to the customer). I'll try to illustrate it below:
record service1 service2
1 8 5
2 4 1
3 7
4 3 8
5 8
So what I want to do is to count the records (there are 5) check to see how many have 2 service codes (there are 3) and of these, how many contain the service code of 8 in either field(just 2). Then I need to count all of the records subtracting any records that have two service codes in which one contains a value of 8 (my result would be 3 because 2 have two services of which one contains the value of 8).
Anyway, I hope this makes sense. I have tried a number of things but cannot figure out how to do it.
I have two fields in my DB that contain numerical codes that represent the types of services that we provided to our customers. I think the field is actually a string field, but the front end users enter a number to represent the service (1-9). I'll just call the fields service1 & service2. Most of the service2 fields contain no data.
What I need to do is to count all the service that were paid in a week (which is just a matter of counting the records). But I don't want to include the records that have two service codes (indicated by a value in the service2 field)in which one of the two fields contains the value 8 (representing a free service that was not charged to the customer). I'll try to illustrate it below:
record service1 service2
1 8 5
2 4 1
3 7
4 3 8
5 8
So what I want to do is to count the records (there are 5) check to see how many have 2 service codes (there are 3) and of these, how many contain the service code of 8 in either field(just 2). Then I need to count all of the records subtracting any records that have two service codes in which one contains a value of 8 (my result would be 3 because 2 have two services of which one contains the value of 8).
Anyway, I hope this makes sense. I have tried a number of things but cannot figure out how to do it.