SQL Server 截取两个固定字符之间的字符串(案例)
2023-09-27 14:21:29 时间
网上的问题:
参考这篇《函数PARSENAME使用和截取字符串》https://www.cnblogs.com/insus/p/10958452.html 的方法:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
DECLARE @str VARCHAR(1000)='||MO21|TMT-0080|1|10' SET @str = REPLACE(STUFF(@str,1,2,''),'|','.') SELECT PARSENAME(@str,3) --PARSENAME(@str,4) AS [TABLE_CATALOG], --PARSENAME(@str,3) AS [TABLE_SCHEMA], --PARSENAME(@str,2) AS [TABLE_NAME], --PARSENAME(@str,1) AS [COLUMN_NAME] GO
相关文章
- 【数据库开发】is not allowed to connect to this MySQL server解决办法
- percona-server-mongodb-6.0源码安装
- The SQL Server Service Broker for the current database is not enabled
- sql server 2008 在安装了活动目录以后无法启动服务了
- 管理SQL Server数据库服务器的安全防范原则
- SQL Server 一张图让你秒懂联合表查询
- Cas(03)——Cas Server中各配置文件介绍
- 【MySQL案例】mysql-libs-5.1.73-3.el6_5.x86_64 conflicts with file from package Percona-Server-server
- IIS FTP Server Anonymous Writeable Reinforcement, WEBDAV Anonymous Writeable Reinforcement(undone)
- Sql Server系列:日期和时间函数
- 工具介绍:Sql Server Profiler
- Setup SQL Server 2008 Maintenance Plan Email Notifications