BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DME790
Pyrite | Level 9

Hi All,

 

I have a daily file that holds all historical data which I use to replace the data in a table.

 

I have the following code that appends data to a table but how do I use a data step to replace all the data?

 

Data Step used to append data

Data worklib.OriginalData;
	Set worklib.OriginalData
WORK.appenddata
;
Run;

Any help appreciated.

 

Cheers

 

Dean

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Not sure what you question is since you appear to already know how to REPLACE that dataset.

Your current program is replacing the dataset with the data from current dataset AND the data from another dataset.

If you just want to replace it with another dataset then don't include the current dataset in the SET statement.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Not sure what you question is since you appear to already know how to REPLACE that dataset.

Your current program is replacing the dataset with the data from current dataset AND the data from another dataset.

If you just want to replace it with another dataset then don't include the current dataset in the SET statement.

DME790
Pyrite | Level 9

@Tom ,

 

Thanks Tom - I need to stop thinking things are more complicated than they are.

 

Cheers

 

Dean

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1044 views
  • 0 likes
  • 2 in conversation