Description:
In this example we explain that how to Get file name
from file full path in SQL Server.or hoe to fetch the file name from the SQL
Server.as we know that we will store the full path of the file in SQL Server so
how can I fetch the only file name from the SQL Server.below is the SQL Query
that will fetch the file name from the full path in SQL Server.
The below query return the file name like “Customer.xlxs”
DECLARE @fullpath VARCHAR(1000)
SET @fullpath = 'D:\Projects\UploadFiles\Customers.xlsx'
SELECT RIGHT(@fullpath, CHARINDEX('\', REVERSE(@fullpath)) - 1)
0 comments:
Post a Comment