Hello,
In SAS Enterprise Guide (7.1), I have a temporary current snapshot data table that I want to append into a permanent table. The permanent table would then hold multiple snapshots of the data and keep that history. The columns between the two tables are exactly the same. The permanent table has already been created and the initial data set has been loaded, now I want to add a new snapshot to the permanent table.
I have attempted to use the 'Append Table' task (from one WORK table), but it overwrites the data in the permanent table rather than adding new rows to it. There is just one source temporary table.
Below is an example of some code I have attempted to use, but it isn't complete and doesn't work.
DATA PERMANENT.SNAPSHOT_ALL;
SET WORK.SNAPSHOT_CURRENT;
RUN
Append is the correct task for this. Can you post a snapshot of your settings that didn't work?
Otherwise
proc appemd base=permanent.snapshot_all data=snapshot.curremt;
run;
Append is the correct task for this. Can you post a snapshot of your settings that didn't work?
Otherwise
proc appemd base=permanent.snapshot_all data=snapshot.curremt;
run;
Hi Reeza,
Thank you, that PROC APPEND function worked. I used:
proc append base=PERMANENT.SNAPSHOT_ALL data=WORK.SNAPSHOT_CURRENT;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.