Hello,
I'd like to cut off a specific part from string. I'm looking for solution made in query builder with enterprise guide. I want to delete all parts containing 'PL003' or 'PL005'.
Example string:
PL0031234
PL00512345
PL003PL005123456
My target to achieve:
1234
12345
123456
Can you help me?
In the Query builder, create new calculated column, as 'Advanced Expression', and in the expression use the following
/* new */
(PRXCHANGE('s/PL00\d//',-1,t1.x)) AS new
This will give you the desired output.
Hope this helps,
Ahmed
In the Query builder, create new calculated column, as 'Advanced Expression', and in the expression use the following
/* new */
(PRXCHANGE('s/PL00\d//',-1,t1.x)) AS new
This will give you the desired output.
Hope this helps,
Ahmed
Thanks a lot! This expression works great.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.