DATA Step, Macro, Functions and more

Delete specific words from specific column

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Delete specific words from specific column

Hey,

So now I have a 'test' table which has a column 'words' with random values + number of 78:

Words

Anime 78

Rhino fdsgf 78

town 78

New York city 78

And now I need to rewrite this data set so it would have all the same data, excluding number 78 which makes my table:

Words

Anime

Rhino fdsgf

town

New York city

Thank You all.


Accepted Solutions
Solution
‎05-05-2013 08:12 AM
Super User
Posts: 9,681

Re: Delete specific words from specific column

OK.

data have;
input words & $20.;
word=tranwrd(words,'78','');
cards;
Anime 78
Rhino fdsgf 78
town 78
New York city 78
;
run;


Ksharp

View solution in original post


All Replies
Solution
‎05-05-2013 08:12 AM
Super User
Posts: 9,681

Re: Delete specific words from specific column

OK.

data have;
input words & $20.;
word=tranwrd(words,'78','');
cards;
Anime 78
Rhino fdsgf 78
town 78
New York city 78
;
run;


Ksharp

☑ This topic is SOLVED.

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

Discussion stats
  • 1 reply
  • 192 views
  • 0 likes
  • 2 in conversation