Extracting the File Name from a Path

To extract the last item from a file path (i.e. the file with the extension) in SQL, use:

    select replace(path, rtrim(path, replace(path, '/', '')), '')
        as last from abc;


Home