I have two tables. One holds customer information, the other, a table that has the following;
CustomerID Status
1001046 A
1001047 D
1001047 P
1001047 D
1001048 D
1001048 D
1001049 P
etc...
I need to isolate only those customers where they have any ‘D’ status record(s), but no ‘P’ status records. In the above example, the only customer that would qualify would be 1001048. Each customer could have lots of ‘D’, lots of ‘P’, etc. The join between the [Customers] and [CustomerStatus] tables would be the CustomerID field.
Can anyone help?
Thanks
Richard
CustomerID Status
1001046 A
1001047 D
1001047 P
1001047 D
1001048 D
1001048 D
1001049 P
etc...
I need to isolate only those customers where they have any ‘D’ status record(s), but no ‘P’ status records. In the above example, the only customer that would qualify would be 1001048. Each customer could have lots of ‘D’, lots of ‘P’, etc. The join between the [Customers] and [CustomerStatus] tables would be the CustomerID field.
Can anyone help?
Thanks
Richard