sql语句substring 用法
2016-07-02 15:37
369 查看
select t.OperationLog,
case when charindex('ID为',t.OperationLog)>1 then
SUBSTRING(t.OperationLog,
charindex('ID为',t.OperationLog)+3
,charindex(')',t.OperationLog)-charindex('ID为',t.OperationLog)-3)
end ,
t.CreatePersonId,
t.* from PaymentOrder t where t.UpdateDate>'2016-1-1'
select t.OperationLog,
case when charindex('ID为',t.OperationLog)>1 then
SUBSTRING(t.OperationLog,
charindex('ID为',t.OperationLog)+3
,charindex(')',t.OperationLog)-charindex('ID为',t.OperationLog)-3)
end ,
t.CreatePersonId,
t.* from PaymentOrder t where t.UpdateDate>'2016-1-1'
相关文章推荐
- Windows 环境下的Oracle 编程
- 1、redis安装与启动
- redis 配置文件详解
- Redis: OOM command not allowed when used memory > ‘maxmemory
- NOSQL Benchmarks
- Memcached与Redis详谈
- 针对SQL语句联表查询深入优化
- PostgresQL FDW 源码分析之 postgresGetForeignPaths()
- flask数据库迁移问题: INFO [alembic.env] No changes in schema detected.
- (1)MySQL语句规范
- REDIS入门教程
- redis info 命令查看redis使用情况
- 关于mysql处理百万级以上的数据时如何提高其查询速度的方法
- win10 64位 环境下安装mysql5.7及登陆失败总结教程
- ubuntu 下安装redis2.8.17
- 数据库中的分页问题
- redis配置详解
- VirtualBox虚拟机与主机互通,并且虚拟机又能上网配置
- sql执行顺序
- NoSQL现状及发展趋势