I have a question regarding joining tables using different data types. I have one data type which is numeric length 8 and one char length 20.
I have tried converting the num8 to char20
PROC SQL;
CREATE TABLE HPXRDATAMINE AS
SELECT
LAB.MEME_CK AS MEME_CK,
HPXRDATA.MEM_UID AS MEM_UID
FROM &LIBHPXR..MEMBER_DIM as HPXRDATA
INNER JOIN WORK.LABCLAIMS AS LAB on HPXRDATA.MEM_SRCKEY=PUT(LAB.MEME_CK,20.);
Also tried converting char20 to num8
PROC SQL;
CREATE TABLE HPXRDATAMINE AS
SELECT
LAB.MEME_CK AS MEME_CK,
HPXRDATA.MEM_UID AS MEM_UID
FROM &LIBHPXR..MEMBER_DIM as HPXRDATA
INNER JOIN WORK.LABCLAIMS AS LAB on (NPUT(HPXRDATA.MEM_SRCKEY,8.)=LAB.MEME_CK;
Neither is bringing back anything (consistently). Any help would be great. I’ve tried doing the LEFT(TRIM()) function on the data as well.
Thanks.
... View more