Hello,
I need to append two tables loaded in SAS:
- STORIC_TABLE of about 1.2 TB and 50 columns
- TAB1 of about 30 GB and 51 columns (one column more than the STORIC_TABLE)
I would like to know which is the most optimized code to append the TAB1 to the STORIC_TABLE.
Obviously, due to the presence of one more field, the STORIC_TABLE will have missing values corresponding the new TAB1 field
thanks
ElisabettaC
Could try proc SQL outer union or proc append. This paper shows all the way to combine data vertically and you could read more about the efficiency as well as see examples.
https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/3161-2019.pdf
Unfortunately, the outer union corr option doesn't work with proc fedsql, as shown in the image below:
The link I sent you said "corresponding". did you try it with that?
"Union corresponding" doesn't fail but doesn't return the expected result!
With union corresponding it appends only the fields that match (50 fields) and doesn't create the new field.
The expected table must have 51 columns.
Why do you have to use corresponding? What if you just try "outer union"? Do you get 51 then?
No, I get a syntax error (same error even with outer union corr)
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.