I have two tables that have the same type and format for both dates. My code is this: PROC SQL; CREATE TABLE ReAdm.Sum2010 AS (SELECT DISTINCT A.MBR_SYS_ID, A.TIN, A.FST_SRVC_DT, A.READMIT, B.ALLOWED_AMT, B.ADMIT_DT, B.DISCH_DT, B.CUTPUT_DT, B.START_DT, B.STAT_DAY, B.START_DT2, B.READMIT_DT, B.REDISCH_DT, B.CUTPUT_DT2 FROM ReAdm.ReAdm1 A LEFT JOIN ReAdm.Cleaning3 B ON A.MBR_SYS_ID = B.MBR_SYS_ID AND A.TIN = B.TIN WHERE A.FST_SRVC_DT BETWEEN ('01-01-2010') AND ('12-31-2010') AND A.READMIT >=1 AND B.START_DT2 IS NOT NULL); RUN; If I take the date items out it runs fine but putting the date stuff in I get this error: ERROR: Expression using IN has components that are of different data types. NOTE: The IN referred to may have been transformed from an OR to an IN at some point during PROC SQL WHERE clause optimization. 449 RUN; NOTE: PROC SQL statements are executed immediately; The RUN statement has no effect.
... View more