Reputation: 1
Right now I am having a column in sas data set.This dataset has been created in sas enterprie guide EG
S.NO. COUNT
1 5
2 6
3 7
4 2
5 10
Now the dataset that I desire.
S.NO. COUNT MASKED
1 5 XXXXX
2 6 XXXXXX
3 7 XXXXXXX
4 2 XX
5 10 XXXXXXXXXX
Basically the number present in the count,I want that many 'x' in the 'MASKED' column.
Thank in advance.
Upvotes: 0
Views: 42
Reputation: 1269463
In SAS proc SQL, try the repeat()
function:
select t.*, repeat('X', count)
from t;
Upvotes: 1