Viewing 4 posts - 1 through 4 (of 4 total)
Awesome!!!
Very nice to understand.
But,I do not want to to hard code value 12 and 8. This is what i used that Reverse function.
(Sometime there is a chance in the filename...
January 28, 2020 at 7:57 am
DECLARE @Text nvarchar(250) = '\\ABC.dns.com\file_path1\filepath2\inc_files_20200122.xls'
SELECT SUBSTRING(REVERSE(@Text),CHARINDEX('.',REVERSE(@Text))+1,CHARINDEX('_',REVERSE(@Text))-CHARINDEX('.',REVERSE(@Text))-1)
January 27, 2020 at 11:41 am
Viewing 4 posts - 1 through 4 (of 4 total)