Payers can be type Lab = 17006 and type Non_Injury_TPA = 17006.
Have drafted query that gives me PAYER_IDs that are both types,
copied herewith below.
By ordering by Payer_ ID it can be seen which Payers have both types
but there are 7k of them so a query is needed that lists only Payer
that have both types.
Tried using an AND clause and a couple of other attempts with no luck.
I think it may be a GROUP BY but not sure of the syntax.
Is there a query which will list only Payers that have PAYER_TYPE_CODE 17006
Allen in Dallas
FROM CCM.CCM_PAYER_TYPE PAT
join CCM_PAYER PAY on PAY.PAYER_ID = pat.payer_id
where payer_type_code = 17006
or payer_type_code = 17007
order by PAY.PAYER_ID