- How deep the directory path by calculating the number of backslash in a path.
- How many item in a list of string by calculating number of comma in the string.
DECLARE @cPath varchar(100)
SET @cPath = 'D:\TEMP\test.txt'
SELECT len(@cPath) - len(replace(@cPath, '\', ''))
No comments:
Post a Comment