Subscribe Bookmark RSS Feed

Updating time series data

JesperJohansen

Community Trekker

Joined:

Apr 15, 2013

I am trying to find an easy way to continuously update a data set as it develops. That is I have a data set in which I have added a number of calculation columns and analyses. Each day I more data come in. When I extract the new data all the old data is also contained in the new data-set. I want to update the old data-set with ONLY the new data. Using "Update" does not add the new data rows and "Concatenate" will add all rows creating duplicate rows of the old data. How do I merge two data sets in one is contained in the other, but contains new columns that I nee to keep?

E.g. i want to combine:

DayValueSQRT(Value)
1103,162278
2113,316625

with:

DayValue
110
211
39
413

to yield:

DayValueSQRT(Value)
1103,162278
2113,316625
393
4133,605551
BR
Jesper
2 REPLIES
gflex

Community Trekker

Joined:

Jun 23, 2011

I don't know of a one step way to do this.  Concatenate will work, as long as the rows that will be come duplicate are deleted in either file before the table action is executed.  This may mean deleting all rows in your table with the formulas & scripts, or deleting redundant data from the incoming file.

Another approach would be to move all of the formulas to the new table.  There is a handy script on the file exchange utilities section that will transfer formulas between files- lookup "Copy Formulas".

http://support.sas.com/demosdownloads/license.jsp?productID=111231&jmpflag=Y

JesperJohansen

Community Trekker

Joined:

Apr 15, 2013

I found a way of making "Join" solve the problem for me. But thank you for the script. That'll certainly come in handy.

BR
Jesper