-
-
Save amtwo/4fdfd8c07fc341d8105913309cf945af to your computer and use it in GitHub Desktop.
Finding the Final Slash in a file path;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @FilePath nvarchar(300) = N'C:\Users\Andy\Documents\GitHub\dba-database\stored-procedures\dbo.Alert_Blocking.sql'; | |
SELECT FilePath = @FilePath, | |
PathLen = LEN(@FilePath), | |
FinalSlashPos = CHARINDEX('\', REVERSE(@FilePath), 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment