I have below variables in my result set. These are result of an substring function.
I want to get only the numeric values before first delimiter(/, ?). So the result set should look like this.
Can somebody please help me write a substring for this? The issues I have are
1. Length of result set varies between 4 to 7
2. First delimiter can be either ? or /
Thanks in advance.
this will work using substring.
sel case when col like '%/%' then substr(col,1,position ('/' in col) -1 )
else substr(col,1,position ('?' in col) -1 )
I was wondering if there was something like this in place for TD. I learnt about regexp_substr through the other thread "help needed in a regular expression".
Thanks a lot. I will work with both of these.