I have a column that contains values such as
Column
Asset|Class1|Category1|Group1|Account1
Expense|Class23|Category23|Group23|Account23
I want to select the string between 3rd and 4th occurrence of my pipe delimiter, how can I achieve this?
I've tried the PARSENAME and charindex+stuff function, but they have limitations, like max 128 characters. Also our SQL server has limited regex support. Any ideas?
SELECT REVERSE(PARSENAME(REVERSE(replace(LTRIM(Column), '|', '.')), 3))
My select need to return: Group1 Group23