SELECT B.EMPLID , CASE WHEN C.ACCOMP_CATEGORY = 'DEG' THEN %TrimSubstr(B.ACCOMPLISHMENT,1,8) %Concat 'x' %Concat %TrimSubstr(B.MAJOR_CODE,1,10) ELSE '' END AS DEG , CASE WHEN C.ACCOMP_CATEGORY = 'MEM' THEN %TrimSubstr(B.ACCOMPLISHMENT,1,8) ELSE '' END AS MEM , CASE WHEN C.ACCOMP_CATEGORY = 'LIC' THEN %TrimSubstr(B.ACCOMPLISHMENT,1,8) %Concat 'x' %Concat %TrimSubstr(B.COUNTRY,1,3) %Concat 'x' %Concat %TrimSubstr(B.STATE,1,6) ELSE '' END AS LIC FROM %Table(RS_WRKR_ELGBL) A , %Table(ACCOMPLISHMENTS) B , %Table(ACCOMP_TBL) C WHERE A.EMPLID = B.EMPLID AND B.ACCOMPLISHMENT = C.ACCOMPLISHMENT AND C.ACCOMP_CATEGORY IN ('DEG','MEM','LIC') AND A.SYSTEM_SOURCE='WM'
|