I have a string like this '/1064_MyHoldings/ONLINE/Adhoc/Rpt_CompanyCodeElig' i just want to extract '1064_MyHoldings' only like wise there are different strings like this where i just want 1st part of string between the first two delimiters?
select
left(Applications, Len(Path) - CHARINDEX('/', Applications) + 1) FolderName
from
(select distinct
Substring(C.Path, CHARINDEX('/', C.Path) + 1, LEN(C.Path) - CHARINDEX('/', C.Path)) Applications) Result
where Applications is the column name having data like '/1064_MyHoldings/ONLINE/Adhoc/Rpt_CompanyCodeElig'
Expected result should Be '1064_MyHoldings' that is only the first part of string between the first two '/'