Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Extract only the filename from a file path

    SELECT
    --SUBSTRING(orignal file name,Last Char Index Of '\', FileName Length)
    SUBSTRING(    physical_Name,(LEN(physical_Name)-CHARINDEX('\',REVERSE(physical_Name))+2),LEN(physical_Name))
    from sys.master_files
    order by 1 asc;

Viewing post 1 (of 1 total)