sql模糊查询,解除绑定的单号

--610007570320-610007571319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007570320
and TO_NUMBER(bill_code) <= 610007571319); delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007570320
and TO_NUMBER(bill_code) <= 610007571319);
-- 610007572320-610007573319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007572320
and TO_NUMBER(bill_code) <= 610007573319);
--610007571320-610007572319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007571320
and TO_NUMBER(bill_code) <= 610007572319);
--610007585320-610007586319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007585320
and TO_NUMBER(bill_code) <= 610007586319);
-- 610007582320-610007583319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007582320
and TO_NUMBER(bill_code) <= 610007583319);
--610007575320-610007576319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007575320
and TO_NUMBER(bill_code) <= 610007576319);
-- 610007568320-610007569319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007568320
and TO_NUMBER(bill_code) <= 610007569319);
--610007578320-610007579319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007578320
and TO_NUMBER(bill_code) <= 610007579319);
--610007586320-610007587319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007586320
and TO_NUMBER(bill_code) <= 610007587319);
--610007550320-610007551319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007550320
and TO_NUMBER(bill_code) <= 610007551319);
--610007558940-610007559319 380张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007558940
and TO_NUMBER(bill_code) <= 610007559319);
--610007556320-610007557319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007556320
and TO_NUMBER(bill_code) <= 610007557319);
--610007589320-610007590319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007589320
and TO_NUMBER(bill_code) <= 610007590319);
--610007564320-610007565319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007564320
and TO_NUMBER(bill_code) <= 610007565319);
--610007581320-610007582319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007581320
and TO_NUMBER(bill_code) <= 610007582319);
--610007569320-610007570319 1000张 delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007569320
and TO_NUMBER(bill_code) <= 610007570319); --610007552320-610007553319 1000张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007552320
and TO_NUMBER(bill_code) <= 610007553319);
--610007558460-610007558819 360张
delete from (select t.*
from (select t1.bill_code, t1.bind_code, t1.use_flag
from t_mm_section_sl t1
where t1.bill_code like '6100075%') t
where TO_NUMBER(bill_code) >= 610007558460
and TO_NUMBER(bill_code) <= 610007558819);
commit;
注:开始的时候写的下面的,一直报错,原因是bill_code的值有是字母的,所以后来就过滤掉那些不是纯数字的单号,再用to_number就好了

sql模糊查询,解除绑定的单号的更多相关文章
- sql模糊查询
SQL 模糊查询 在进行数据库查询时,有完整查询和模糊查询之分. 一般模糊查询语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式: ...
- SQL 模糊查询
在进行数据库查询时,有完整查询和模糊查询之分.一般模糊查询语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式:1,%:表示任意0个 ...
- SQL 模糊查询(like)
在进行数据库查询时,有完整查询和模糊查询之分. SQL模糊查询,使用like比较字,加上SQL里的通配符,请参考以下: 1.LIKE'Mc%' 将搜索以字母 Mc 开头的所有字符串(如 McBadde ...
- [转]SQL 模糊查询
在进行数据库查询时,有完整查询和模糊查询之分. 一般模糊查询语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式: 1,% :表 ...
- 8.mybatis动态SQL模糊查询 (多参数查询,使用parameterType)
多参数查询,使用parameterType.实例: 用户User[id, name, age] 1.mysql建表并插入数据 2.Java实体类 public class User { public ...
- SQL模糊查询与删除多条语句复习
string IDlist="1,2,3"; 批量删除数据 StringBuilder strsql=new StringBuilder(); strSql.Append(&quo ...
- Jmeter中JDBC Request和BeanShell PostProcessor的结合使用(SQL模糊查询)
[前言] 今天记录一下Jmeter中JDBC Request和BeanShell PostProcessor的结合使用的方法(SQL模糊查询) [步骤] 1.下载对应数据库的驱动包到jmeter安装目 ...
- SQL模糊查询条件的四种匹配模式
执行数据库查询时,有完整查询和模糊查询之分. 一般模糊语句格式如下: SELECT 字段 FROM 表 WHERE 某字段 LIKE 条件 其中关于条件,SQL提供了四种匹配模式: 1.% :表示任意 ...
- 有关SQL模糊查询
执行 数据库查询时,有完整查询和模糊查询之分. 一般模糊语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式: 1,%:表示任意0个 ...
随机推荐
- 在 CentOS 环境下安装 .NET Core
安装步骤: 参见官网 CentOS 会报以下错误: Error downloading packages: dotnet-runtime-2.2-2.2.4-1.x86_64: [Errno 256] ...
- STM32CUBEMX使用注意:
一 注意堆栈大小,简单来说,栈空间用于局部变量空间(size=0x400一般够用),堆(size=0x200一般够用)空间用于 alloc 或者 malloc函数动态申请变量空间
- Web service简介 与servletContext的参数
Web service顾名思义是基于web的服务,它是一种跨平台,跨语言的服务. 我们可以这样理解它,比如说我们可以调用互联网上查询天气信息的web服务,把它嵌入到我们的B/S程序中,当用户从我们的网 ...
- AJPFX关于StringBuffer,StringBuilder类 总结(一)
StringBuffer,StringBuilder类 StringBuffer是同步的,数据安全,效率低;StringBuilder是不同步的,数据不安全,效率高 StringBuffer:概述1) ...
- AJPFX总结面向对象中成员变量和成员方法的定义
//面向对象中成员变量和成员方法的定义格式:========================================= 成员变量定义在类中方法外,可以被该类中所有方法使用. ...
- [转]java注解与APT技术
下面是一个简单的自定义注解的栗子: package annotation; import java.lang.annotation.Documented; import java.lang.annot ...
- SQL数据库学习,常用语句查询大全
数据库学习 sql server数据库基本概念 使用文件保存数据存在几个缺点: 1.文件的安全性问题: 2.文件不利于查询和对数据的管理: 3.文件不利于存放海量数据 4.文件在程序中控制不方便. 数 ...
- Android 使用GridView+仿微信图片上传功能(附源代码)
由于工作要求最近在使用GridView完成图片的批量上传功能,我的例子当中包含仿微信图片上传.拍照.本地选择.相片裁剪等功能,如果有需要的朋友可以看一下,希望我的实际经验能对您有所帮助. 直接上图,下 ...
- grep的几个参数
-a 在二进制问就爱你中,以文本方式进行搜索 -c 计算找到搜索字符串的次数 -i 忽略大小写 -n 输出行号 -v 反向选择,即没有显示搜索字符串内容的那一行 grep -n '\.$' file ...
- iOS 如何使用TabbarController
xcode中给我内置很多app模版,不过很多时候我们需要更加灵活的初始化项目.下面我就简单介绍一下,如何从0开始制作一个tabbar app. 创建个项目,由于我们从头开始写程序,因此理论上对模版没有 ...