--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模糊查询,解除绑定的单号的更多相关文章

  1. sql模糊查询

    SQL 模糊查询 在进行数据库查询时,有完整查询和模糊查询之分. 一般模糊查询语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式: ...

  2. SQL 模糊查询

    在进行数据库查询时,有完整查询和模糊查询之分.一般模糊查询语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式:1,%:表示任意0个 ...

  3. SQL 模糊查询(like)

    在进行数据库查询时,有完整查询和模糊查询之分. SQL模糊查询,使用like比较字,加上SQL里的通配符,请参考以下: 1.LIKE'Mc%' 将搜索以字母 Mc 开头的所有字符串(如 McBadde ...

  4. [转]SQL 模糊查询

      在进行数据库查询时,有完整查询和模糊查询之分. 一般模糊查询语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式: 1,% :表 ...

  5. 8.mybatis动态SQL模糊查询 (多参数查询,使用parameterType)

    多参数查询,使用parameterType.实例: 用户User[id, name, age] 1.mysql建表并插入数据 2.Java实体类 public class User { public ...

  6. SQL模糊查询与删除多条语句复习

    string IDlist="1,2,3"; 批量删除数据 StringBuilder strsql=new StringBuilder(); strSql.Append(&quo ...

  7. Jmeter中JDBC Request和BeanShell PostProcessor的结合使用(SQL模糊查询)

    [前言] 今天记录一下Jmeter中JDBC Request和BeanShell PostProcessor的结合使用的方法(SQL模糊查询) [步骤] 1.下载对应数据库的驱动包到jmeter安装目 ...

  8. SQL模糊查询条件的四种匹配模式

    执行数据库查询时,有完整查询和模糊查询之分. 一般模糊语句格式如下: SELECT 字段 FROM 表 WHERE 某字段 LIKE 条件 其中关于条件,SQL提供了四种匹配模式: 1.% :表示任意 ...

  9. 有关SQL模糊查询

    执行 数据库查询时,有完整查询和模糊查询之分. 一般模糊语句如下: SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式: 1,%:表示任意0个 ...

随机推荐

  1. JAVA常用知识总结(二)

    JAVA中的参数传递总结先看两道笔试题: public class Test2 { public static void main (String [] args) { StringBuffer a ...

  2. MongoDB管理练习

    一.索引 1.插入10W条数据 文档内容为:{name:zs-i,age:1} 2016-06-07T14:35:57.041+0800 I CONTROL [initandlisten] > ...

  3. WPF日常需要使用的操作

    窗体如何居中弹出 在窗体上添加属性  WindowStartupLocation="CenterScreen" 窗体如何隐藏掉windows边框 添加属性WindowStyle=& ...

  4. SpringBoot 2.x (8):模板引擎

    SpringBoot中有很多的starter:本质是多个JAR包集合 比如我们常用的: <dependency> <groupId>org.springframework.bo ...

  5. 浅析Statement和PreparedStatement的区别

    当我们使用java程序来操作sql server时会使用到Statement和PreparedStatement,俩者都可以用于把sql语句从java程序中发送到指定数据库,并执行sql语句.那么如何 ...

  6. 【HEVC帧间预测论文】P1.9 Coding Tree Depth Estimation for Complexity Reduction of HEVC

    Coding Tree Depth Estimation for Complexity Reduction of HEVC <HEVC标准介绍.HEVC帧间预测论文笔记>系列博客,目录见: ...

  7. 【HEVC帧间预测论文】P1.7 Content Based Hierarchical Fast Coding Unit Decision Algorithm

    Content Based Hierarchical Fast Coding Unit Decision Algorithm For HEVC <HEVC标准介绍.HEVC帧间预测论文笔记> ...

  8. postgres的强制类型转换与时间函数

    一.类型转换postgres的类型转换:通常::用来做类型转换,timestamp到date用的比较多select  now()::dateselect  now()::varchar 示例1:日期的 ...

  9. 多表单异步验证 可以用 Promise validate

    https://www.jb51.net/article/140062.htm vue动态绑定组件子父组件多表单验证功能的实现代码 // 加载组件:每次下拉框监听则给changValue新赋值,如果下 ...

  10. 网页添加tittle前的图标logo

    在head标签中 <link rel="icon" href="~/favicon.ico" type="image/x-icon" ...