Hi,
my criteria is to update the existing record if it exists in the cumulative dataset else if it is new record then it needs to be added to the cumulative dataset. The cumulative data contains history data .
I tried the below but it didnt work. Any other suggestions-
data adhoc.dly_cumulative;
update adhoc.dly_cumulative adhoc.dly_&day0
by column;
run;
How didn't it work?
Update is designed exactly that function, update record if it exists or add it in otherwise.
ERROR 411-185: The UPDATE statement requires two data sets, too many data sets have been specified.
This is the error i am getting when trying to execute the above.
Post your full log then. My *guess* is that your macro variable is resolving with spaces so the update statement see's 3 datasets?
UPDATE, or MODIFY??
It looks like you need to add a semicolon at the end of the UPDATE statement. The software thinks BY and COLUMN are names of additional data sets.
Yes it worked after adding the semicolon. Thank you!!
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.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.