BookmarkSubscribeRSS Feed
Aayushi_17
Quartz | Level 8

I have a table say table A and it has columns as like in below pic1,

CF-458578 is the batch id and CR-12534554 is the entity ID.

Each entity ID is associated with one or more batch id.

CR-12534554 is associated with two batch id namely CF-458578 and CF-459186.

Whenever I find the keyword 'Item removed from' in the description field, I want to filter out the only the removed batch and the result should be the same as in below pic2,

 

Can u pls help me to solve this one in Proc sql

input ; 

Entity IDDescription
CR-12534554Item created
CR-12534554Item assigned to CF-458578 
CR-12534554Item removed from CF-458578 
CR-12534554Item created
CR-12534554Item assigned to CF-754456
CR-12534554Item assigned to CF-459186
CR-12534554Item assigned to CF-675584
CR-12534554Item fixed

 

this who the output is expected :

Entity IDDescription
CR-12534554Item created
CR-12534554Item assigned to CF-458578 
CR-12534554Item created
CR-12534554Item assigned to CF-754456
CR-12534554Item assigned to CF-459186
CR-12534554Item assigned to CF-675584
CR-12534554Item fixed

 

thanks in advance 

1 REPLY 1

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 403 views
  • 0 likes
  • 2 in conversation