I am trying to create a query where when one record within a household meets my criteria, I want all records to come back in the household. But I also need to exclude certain ptypes.
For example, I want all households that have a 'NOW' ptype, but does not include a 'CD' ptype. Using the sample data below, only one of these household would qualify, and I want all those records in my answer.
HHNUM PTYPE NIBOAC
200606892 CD 0
200606892 MMA 11913
200606892 NOW 76541
200606918 CRD 0
200606918 HEQ 10893
200606918 ODP 0
200606918 NOW 42884
Thanks.
For example, I want all households that have a 'NOW' ptype, but does not include a 'CD' ptype. Using the sample data below, only one of these household would qualify, and I want all those records in my answer.
HHNUM PTYPE NIBOAC
200606892 CD 0
200606892 MMA 11913
200606892 NOW 76541
200606918 CRD 0
200606918 HEQ 10893
200606918 ODP 0
200606918 NOW 42884
Thanks.
Comment