Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Update existing data in LASR table

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

Update existing data in LASR table

Hi

 

I have loaded data from a file in LASR server. Take the example data set as below:

 

WRDATEEMPREFHome Cost CtrHome DepartmentTAS Cost CentreTAS ProjectTAS Task
27-02-20179SALV ADMINSalvage Bay 7SALV ADMINTEAM LEADER
28-02-20179SALV ADMINSalvage Bay 7SALV ADMINTEAM LEADER
27-02-201716CGLCGL WH Bay 4TOM TOMSCANNER
28-02-201716CGLCGL WH Bay 4TOM TOMSCANNER

 

Now, I am receiving a file with modified data and I need to update the existing record. Could you please suggest how this can be achieved ? One of the ways is to use Proc Imstat. I created a column "flag" in existing dataset. The new data was laoded in a dataset with flag set as 1. The flag for existing data set was set as 0. Through Proc Imstat, new data was appended to old. And then I deleted data where flag = 0. However, this would work only if I receive full file always. In my case, i am receiving ONLY modified data in new file. I was looking for a way to update the existing record with new record based on some key parameters. In this case Date, cost centre and Task are my keys.

 


Accepted Solutions
Solution
‎03-21-2017 08:15 AM
Occasional Contributor
Posts: 13

Re: Update existing data in LASR table

 Was able to achieve this using Update statement in Data Step.

View solution in original post


All Replies
Solution
‎03-21-2017 08:15 AM
Occasional Contributor
Posts: 13

Re: Update existing data in LASR table

 Was able to achieve this using Update statement in Data Step.

Occasional Contributor
Posts: 9

Re: Update existing data in LASR table

Hi,

 

I have similar problem. I need to update file, while in memory, but every time I try to modify file with data step I receive message that I have no UPDATE rights.

I can create and delete files, but I can't modify them.

Simple delete rows would be enough, because I am able to append, but somehow LASR does not allow me to do it.

 

Could you advise if you had similar problem or how you resolve your problem?

 

Thank you in advance

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 301 views
  • 1 like
  • 2 in conversation