How to get string between parenthesis?
Hi Experts,
I have a string between 2 parenthesis. how to get the string between 2 parenthesis as follows
my input is: (success)
output will be only success
how can i achieve this??
0
Hi Experts,
I have a string between 2 parenthesis. how to get the string between 2 parenthesis as follows
my input is: (success)
output will be only success
how can i achieve this??
Comments
WITH input(s) AS (SELECT '(success)' )
SELECT REPLACE(REPLACE(s,'(',''),')','') FROM input;
You can also use the TRANSLATE function:
See:
https://my.vertica.com/docs/9.0.x/HTML/index.htm#Authoring/SQLReferenceManual/Functions/String/TRANSLATE.htm