All, I am new to SAS and I am having a problem using a like or contains function in my routine. Below is my code PROC SQL;
CREATE TABLE FINAL AS
SELECT DISTINCT
T1.*,
CASE WHEN T2.NPI IS NOT NULL THEN 'Preventative Visit' ELSE '' END AS CATEGORY,
DOS,
CASE WHEN T3.HCC IS NOT NULL THEN T3.HCC ELSE 0000 END AS CATEGORY
FROM WORK.ALLDATA T1
LEFT JOIN CLAIMS2 T2 ON T2.mbr_key = T1.mbr_key AND T1.NPI = T2.NPI
LEFT JOIN CLAIMS_HCC T3 ON T2.mbr_key = T1.mbr_key AND T1.ALL_HCC contains '',' || T3.HCC || ',''
;
RUN; 1. the field T1.ALL_HCC has data that looks like this example: 81,22,100 (basically it can contain one or multiple numbers seperated by commas) the data type is string for this field. 2. the field T3.HCC will only contain one number In my Case statement I want to return the T3.HCC when it exists anywhere in field T1.ALL_HCC Any help is greatly appreciated..... Brian I am using SAS enterprise Guide 7.1
... View more