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.
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.
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.