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个 ...
随机推荐
- ping localhost 返回 ::1的导致不能打开http://localhost的原因及解决
虽然可以在浏览器中正常访问http://localhost但用file,file_get_contents等函数打开http://localhost异常.用127.0.0.1也可以打开,本地hosts ...
- [转]2010 Ruby on Rails 書單 與 練習作業
原帖:http://wp.xdite.net/?p=1754 ========= 學習 Ruby on Rails 最快的途徑無非是直接使用 Rails 撰寫產品.而這個過程中若有 mentor 指導 ...
- P2006 赵神牛的游戏
题目描述 在DNF 中,赵神牛有一个缔造者,他一共有k点法力值,一共有m个技能,每个技能耗费的法力值为a[i],可以造成的伤害为b[i],而boss 的体力值为n,请你求出它放哪个技能,才可以打死bo ...
- 【java基础】Java锁机制
在读很多并发文章中,会提及各种各样锁如公平锁,乐观锁等等,这篇文章介绍各种锁的分类.介绍的内容如下: 公平锁/非公平锁 可重入锁 独享锁/共享锁(广义) 互斥锁/读写锁(独享锁/共享锁的实现) 乐观锁 ...
- 洛谷 P2680 运输计划
题目背景 公元 2044 年,人类进入了宇宙纪元. 题目描述 L 国有 n 个星球,还有 n-1 条双向航道,每条航道建立在两个星球之间,这 n-1 条航道连通了 L 国的所有星球. 小 P 掌管一家 ...
- jeecms
===标签=== <!-- 显示一级栏目对应的二级栏目 --> <!-- [@cms_channel_list parentId=c.id] [#if tag_list?size&g ...
- How to Slove MB SD C4 Cannot Access OBD2 Port
When using china clone mb sd connect compact 4 Multiplexer, it could not link to the car computer, M ...
- eclipse生成spring boot jar包
1.右击项目,选择Run As - Maven clean 2.右击项目,选择Run As - Maven install 3.成功后 会在项目的target文件夹下生成jar包 4.将打包好的jar ...
- java_日期和时间
1.System类中的currentTimeMillis:1970年1.1到现在的毫秒数 public class DateTest { public static void main(String[ ...
- 背包DP || Codeforces 544C Writing Code
程序员写bug的故事23333 题意:n个程序员,一共写m行程序,最多产生b个bug,问方案数 思路:f[i][j]表示写了i行,产生了j个bug的方案数,因为每个人都是可以独立的,所以i循环到n都做 ...