DECLARE @S VARCHAR(55) = 'abc.346.matriInternational.pdf'
SELECT SUBSTRING(@S, 1, LEN(@S) - CHARINDEX('.', REVERSE(@S)))
I want to get the second set of value from right which is 346,
i have in this column all filenames need to pick second set value and group by and check the table to see how many are duplicated with same second set value.
Thanks a lot for the helpful info.