BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I have a column
Data set 1
Book type Author
fiction raddy
fiction bosco
science srins
science srins


data set 2


I have many columns in data set 2. However one of the column say
description has entries about the author


description


raddy 99 version 1.0 vol 1
bosco 78 version 5.0 vol 8
srins99 version 2.0 vol1
srins_78 version7.0 vol1


I did a full join and have both the columns in data set 3. Now I need a way to find out whether the string in column author is there in column description.

The code should result as
author description flag
raddy raddy y
bosco bosco y


For example raddy is there in the description and author so a flag
colum would be set to Y.


Please help
2 REPLIES 2
Andre
Obsidian | Level 7
You have an answer on another list
LinusH
Tourmaline | Level 20
Just use it as documented...;-)

SQL style:
case when index(description,author) then "y" else "n" end as flag

/Linus
Data never sleeps

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 689 views
  • 0 likes
  • 3 in conversation