BookmarkSubscribeRSS Feed
MagD
Quartz | Level 8

Hi All,

 

I hope this message finds you well. Please assist me with my below query.

 

I want to overwrite an existing table with updated information. I only want to overwrite a 1,000 accounts, and not the whole table of 20,000. I have the following:

 

Existing table:

accountactiondebtor
1paid upYou
2paid upYou
3paid upYou
4paid upYou
5paid upYou
6cureABA
7cureACA
8arrearsAKL

 

Desired output:

accountactiondebtor
1close' ''
2close' ''
3close' ''
4close' ''
5close' ''
6cureABA
7cureACA
8arrearsAKL
5 REPLIES 5
MagD
Quartz | Level 8
Hi KurtBremser,

I found a solution. It's not very efficient but it works. Thank you for wiling to help me.
sustagens
Pyrite | Level 9
Should the update be made whenever the value of action is "paid up"? or is it dependent on the account?
MagD
Quartz | Level 8
Hi sustagens

I found a solution, not very efficient though. I imported the accounts that needed to be changed then used the data step to update the variables.

data test;
set Hello;
if account in
(1
2
3
4) then action = ''close'';
run;

data Final;
set test;
if action = ''closed'' then debtor = " ";
run;
sustagens
Pyrite | Level 9
If it works then all good! It doesn't have to be complicated every time. All the best!