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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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