column1 | column2 | column3 | column4 | date |
aaa | 4567 | gtt | 44 | 20210201 |
aa | 5535 | faas | 44 | 20210202 |
fd | 23 | axv | 44 | 20210203 |
sd | 736 | azxq | 44 | 20210204 |
ghy | 9008 | feet | 44 | 20210205 |
lk | 3339 | wqopp | 44 | 20210206 |
yj | 112 | poo | 44 | 20210207 |
trr | 3634 | piuy | 44 | 20210208 |
hrfthr | 689 | iuyt | 44 | 20210209 |
rt | 2345 | uio | 44 | 20210210 |
column1 | column2 | column3 | column4 | date |
lk | 3339 | wqopp | 44 | 20210206 |
yj | 112 | poo | 44 | 20210207 |
trr | 3634 | piuy | 44 | 20210208 |
hrfthr | 689 | iuyt | 44 | 20210209 |
rt | 2345 | uio | 44 | 20210210 |
Why don't you want to use deleteRows action?
Here is a basic example:
cas casauto;
proc casutil;
load data=sashelp.cars
replace;
quit;
proc casutil outcaslib="public";
promote casdata="cars";
quit;
proc cas;
table.deleteRows / table={caslib="public", name="cars", where="Make='Chrysler'"};
run;
cas casauto terminate;
Here is what you will see in the SAS log:
93 proc cas;94 table.deleteRows / table={caslib="public", name="cars", where="Make='Chrysler'"};95 run;NOTE: Active Session now CASAUTO.{rowsDeleted=15}
With this approche table stays in memory and the "update" taking place in memory?
That is correct.
Hi,
Sorry for being late to reply.
Your code seems not working for me.
What I did..
proc casutil;
load data=sashelp.cars casout="cars" outcaslib="BI_EXP" promote;
run;
Table uploaded to memory successfully.
Then I tried to run:
proc cas;
table.deleteRows / table={caslib="BI_EXP", name="CARS", where="Invoice < 20000"};
run;
Below you can find the log output.
That code works on my server. What version are you using?
92
93 proc cas;
94 table.deleteRows / table={caslib="public", name="cars", where="Invoice < 20000"};
95 run;
NOTE: Active Session now CASAUTO.
{rowsDeleted=122}
It looks like deleteRows action isn't available on SAS Viya version 3.4 - https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=allprodsactions&docset.... I have version 3.5 installed on my server.
So there is no way on my Platform / Version to implement this?
This is not under my consideration.
It is on client's side.
At the moment, this is out of scope.
Is there any other way to delete rows from a table in memory?
Not sure, please reach out to SAS Technical Support.
Thanks a lot @alexal 🙂
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!