working a query to list all paths which contain data or log files. starting with something like:
select physical_name from master.sys.master_files
but want to only include the path, not the file name, and only list each path once...
so, everything left of the rightmost "\" should exclude filenames, and maybe a distinct in there...
but cant figure out how to say "everything left of the rightmost \"
any help would be appreciated.