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;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.
Ready to level-up your skills? Choose your own adventure.