hi i want to use a wild card to get a value after a backslash. eg i have this name "nt authority\iusr"
select * from table1 where name LIKE '%\'
i want to get the value after the backslash so it should give me just 'iusr' in return.
Please refer this code
DECLARE @Temp TABLE (Name VARCHAR(100)) INSERT INTO @Temp VALUES('nt authority\iusr') SELECT SUBSTRING(NAME,CHARINDEX('\', Name)+ 1, 5) AS Name FROM @Temp
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.