博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
截取两个字符串之间不同的部分 sql脚本(可以延伸到进一步判断两字符串之间的相同部分)
阅读量:4210 次
发布时间:2019-05-26

本文共 359 字,大约阅读时间需要 1 分钟。

declare @col1 varchar(1000)
declare @col2 varchar(1000)
set @col1='34,67,89,36'
set @col2='123.456.89.980'
set @col1=' select id=' + replace(@col1,',',' union all select ')
set @col2=' select id=' + replace(@col2,'.',' union all select ')
set @col1=' select b.* from (' + @col1 + ') a right join (' + @col2 + ') b on a.id=b.id where a.id is null '

exec(@col1)

转载地址:http://glzmi.baihongyu.com/

你可能感兴趣的文章
PowerDesigner 正向工程 和 逆向工程 说明
查看>>
PowerDesigner 模型文档 说明
查看>>
PowerDesigner 系列 小结
查看>>
Oracle 升级10.2.0.5.4 OPatch 报错Patch 12419392 Optional component(s) missing 解决方法
查看>>
Oracle sessions,processes 和 transactions 参数 关系 说明
查看>>
RMAN 备份报错 RMAN-06207 RMAN-06208 解决方法
查看>>
[INS-35172] Target database memory (XXMB) exceeds the systems available shared memory ({0}MB) 解决方法
查看>>
深入理解 OUI(Oracle Universal Installer)
查看>>
Oracle LOB 详解
查看>>
磁盘性能 -- IOPS 和 吞吐量 说明
查看>>
Oracle Heap size XXK exceeds notification threshold (2048K) 解决方法
查看>>
Oracle Gloden Gate 系列三 -- GG 支持与不支持的对象类型与操作 说明
查看>>
PowerDesigner PDM 生成SQL脚本 去除 引号 方法
查看>>
Oracle Golden Gate 系列四 -- GG 安装 与 卸载 理论知识
查看>>
关系数据库 范式(NF: Normal Form) 说明
查看>>
Oracle Golden Gate 系列五 -- GG 使用配置 说明
查看>>
Oracle Golden Gate 系列六 -- 11gR2 Ora2Ora 单向复制 GG 示例
查看>>
Oracle Golden Gate 系列七 -- 配置 GG Manager process
查看>>
ORA-00600:[32695], [hash aggregation can't be done] 解决方法
查看>>
Oracle SQL中使用正则表达式 执行报ORA-07445 [_intel_fast_memcpy.A()+10] 错误
查看>>