☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 03-27-2024 06:22 PM
(586 views)
In the column "event" My goal is to keep only 4010, but column event has COMBINED VISIT (-334 & -324) (4010)
The code below returned only VISIT. But I am interested in 4010
data want;
Set have;
redundant=scan(event,1,' ');
event=scan(event,2,' ');
drop redundant ;
run;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try:
event = scan(visit, 4, "()");
First word: COMBINED VISIT
Second word: -334 & -324
Third word: blank between parentheses
Fourth word: 4010
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Try:
event = scan(visit, 4, "()");
First word: COMBINED VISIT
Second word: -334 & -324
Third word: blank between parentheses
Fourth word: 4010