//sqlserver lastIndexOf
select len(c_attachFilePath)+1-charindex('/',reverse(c_attachFilePath)) from [yjs].dbo.HDZX_QUESTION
where [c_attachFilePath] is not null
//sqlserver indexOf
select CHARINDEX('.',c_attachFilePath) from [yjs].dbo.HDZX_QUESTION where [c_attachFilePath] is not null
select len(c_attachFilePath)+1-charindex('/',reverse(c_attachFilePath)) from [yjs].dbo.HDZX_QUESTION
where [c_attachFilePath] is not null
//sqlserver indexOf
select CHARINDEX('.',c_attachFilePath) from [yjs].dbo.HDZX_QUESTION where [c_attachFilePath] is not null
本文探讨了在 SQL Server 中使用内置函数处理文件路径的方法,包括如何获取文件路径的长度、查找特定字符的位置以及解析文件扩展名。
450

被折叠的 条评论
为什么被折叠?



