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 ID | Description |
CR-12534554 | Item created |
CR-12534554 | Item assigned to CF-458578 |
CR-12534554 | Item removed from CF-458578 |
CR-12534554 | Item created |
CR-12534554 | Item assigned to CF-754456 |
CR-12534554 | Item assigned to CF-459186 |
CR-12534554 | Item assigned to CF-675584 |
CR-12534554 | Item fixed |
this who the output is expected :
Entity ID | Description |
CR-12534554 | Item created |
CR-12534554 | Item assigned to CF-458578 |
CR-12534554 | Item created |
CR-12534554 | Item assigned to CF-754456 |
CR-12534554 | Item assigned to CF-459186 |
CR-12534554 | Item assigned to CF-675584 |
CR-12534554 | Item fixed |
thanks in advance
data want;
set have;
if not findw(description,'removed');
run;
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!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.