scottaherbst
Technical User
I'm working in CR10 on an SQL server DB.
Where I work, clients get a variety of services. If I returned all the serice records for a group of clients, it might look something like this:
Client_id Service_number Service_code
100 1 IP
100 2 SC
100 3 MM
100 4 OU
200 1 SC
200 2 MM
200 3 OC
300 1 GH
300 2 SC
300 3 MM
Now, what I want are all the records for clients who don't get particular service types - in this case "IP" and "GH". How do I write a command line that will look at each client to see if they get those services and then return the client records for that don't. After the query, the above data should look like this:
Client_id Service_number Service_code
200 1 SC
200 2 MM
200 3 OC
cleint 100 should be excluded b/c he recieves service "IP" and client 300 should be excluded b/c he gets "GH". Thanks.
Where I work, clients get a variety of services. If I returned all the serice records for a group of clients, it might look something like this:
Client_id Service_number Service_code
100 1 IP
100 2 SC
100 3 MM
100 4 OU
200 1 SC
200 2 MM
200 3 OC
300 1 GH
300 2 SC
300 3 MM
Now, what I want are all the records for clients who don't get particular service types - in this case "IP" and "GH". How do I write a command line that will look at each client to see if they get those services and then return the client records for that don't. After the query, the above data should look like this:
Client_id Service_number Service_code
200 1 SC
200 2 MM
200 3 OC
cleint 100 should be excluded b/c he recieves service "IP" and client 300 should be excluded b/c he gets "GH". Thanks.