DATA CVA1819Q2;
SET CVA.FY1819Q2_VOLUME
CVA.FY1819Q2_MC (IN=MC);
/* ADD LEADING 0 FOR PROCEDURES 1-9 IN ORDER TO SORT PROPERLY */
IF SUBSTR(PROCEDURE,2,1)='.' THEN PROCEDURE = '0'||PROCEDURE;
IF MC=1 THEN PROCEDURE='11. Mitral Clip';
RUN;
Can someone advise if the set statement is concatenating the 2 data sets ? also what is placing the in=mc marker doing in the set statement?
For the proc sql code below: what is outer union corr doing ?
PROC SQL;
CREATE VIEW CVA_MS_LHIN_VIEW AS
SELECT DISTINCT
WAITLISTENTRYID,
PROCEDURE,
PATIENTLHINNAME,
'LHIN' AS SORTORDER
FROM CVA1819Q2(WHERE=(MISSING(PATIENTLHINNAME)=0))
OUTER UNION CORR
SELECT DISTINCT
WAITLISTENTRYID,
PROCEDURE,
'Ontario' AS PATIENTLHINNAME,
'PROV' AS SORTORDER
FROM CVA1819Q2(WHERE=(MISSING(PATIENTLHINNAME)=0));
QUIT;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.