SQL Server - Function to get file name from given path

Опубликовано: 30 Сентябрь 2024
на канале: PracticalIT
2,171
15

I am manifesting one of my version of fetching filename from given path & you may have your version for the same and also this video will showcase use case of below functions:-

The CHARINDEX() function searches for a substring in a string, and returns the position.
If the substring is not found, this function returns 0.
Note: This function performs a case-insensitive search.

The REVERSE() function reverses a string and returns the result.

The LEFT() function extracts a number of characters from a string (starting from left).

The LEN() function returns the length of a string.
Note: Trailing spaces at the end of the string is not included when calculating the length. However, leading spaces at the start of the string is included when calculating the length.

#practicalit #sql #charindex #len #reverse #learnsql #left