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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 581 views
  • 0 likes
  • 3 in conversation