SQL sever 不必写函数,select指令轻松取得档案名字与扩展名 No need function, select command split and get filename and extension
取档案名字 get file name- SELECT (SUBSTRING((FileName), 1, CHARINDEX('.', (FileName)) - 1)) AS FileName
- FROM tblFile
复制代码 取档案扩展名 get file name extension- SELECT REVERSE(SUBSTRING(REVERSE(FileName), 1, CHARINDEX('.', REVERSE(FileName)) - 1)) AS FileExt
- FROM tblFile
复制代码 |
|