Ouch. You don't know this yet, but in SAS code like this:
PROC SQL FULLSTIMER;
CREATE TABLE PCLIB.NEED (COMPRESS=ON) AS
SELECT
A.COL1,
CASE WHEN B.COL2 NE '' THEN B.COL2 ELSE A.COL3 END AS COL4,
SUM(COL5) AS COL6,
SUM(COL7) AS COL8
FROM (SELECT * FROM PCLIB.TABLE1 UNION
SELECT * FROM PCLIB.TABLE2 UNION
SELECT * FROM PCLIB.TABLE3 UNION
SELECT * FROM PCLIB.TABLE4 UNION
SELECT * FROM PCLIB.TABLE5 UNION
SELECT * FROM PCLIB.TABLE6
) AS A
LEFT JOIN TABLE_db B ON A.ID=B.ID
GROUP BY
COL1,
COL4;
QUIT;
is a recipe for disaster. Complex joins of large tables cause SAS to create a utility file in WORK following the "everything including the kitchen sink", and that exceeds your storage. It also takes unnecessarily long.
In which tables are COL5 and COL7 contained?
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.