当前位置:网站首页>SQL 正则解析手机号码提供商
SQL 正则解析手机号码提供商
2022-08-02 16:59:00 【一条鹹鱼】
SELECT
t.phone_number,
CASE
WHEN TRIM( t.phone_number ) REGEXP '^13[5-9]|^134[0-8]|^15[012789]|^18[23478]|^178|^14[78]|^170[356]|^198|^1440'
AND length(TRIM( t.phone_number )) = 11 THEN '中国移动'
WHEN TRIM( t.phone_number ) REGEXP '^13[0-2]|^145|^15[56]|^175|^176|^1704|^1707|^1708|^1709|^171|^18[56]'
AND length(TRIM( t.phone_number )) = 11 THEN '中国联通'
WHEN TRIM( t.phone_number ) REGEXP '^133|^153|^1700|^1701|^1702|^177|^173|^18[019]'
AND length(TRIM( t.phone_number )) = 11 THEN'中国电信' ELSE '未知运营商'
END AS provider
FROM
text_message_send_subtask t
WHERE
operator IS NULL order by phone_number;
边栏推荐
- 扎克伯格“喜迎”苹果AR产品,上市两年终迎大幅涨价
- navicat创建连接 2002-can‘t connect to server on localhost(10061)且mysql服务已启动问题
- golang刷leetcode动态规划(8)盈利计划
- SQL Statement Basics
- Switch 块、Switch 表达式、Switch 模式匹配,越来越好用的 Switch
- 融云「 IM 进阶实战高手课」系列直播上线
- Gartner released, annual Challenger!
- 牛津硕士进碳圈,高瓴红杉经纬一起投了
- 融云「 IM 进阶实战高手课」系列直播上线
- 关于我用iVX沉浸式体验了一把0代码项目创建
猜你喜欢

Flink SQL builds real-time data warehouse DWD layer

js实现改变原来对象中的键值对对应的值

德国客户对文档管理系统、工作流自动化软件 DocuWare 的评价
![js商品总价格、最高价格商品、排除重复商品[初版]](/img/6f/11241f0d717b0c4e163986ba76fe0b.png)
js商品总价格、最高价格商品、排除重复商品[初版]

Pytest study notes

【C语言刷题】指针入门三题|字符串长度、字符串复制、两数交换

Five speakers: seventy genius_platform software platform development 】 【 turn YUY2 RGB24 implementation source code

Kubernetes:(七)优化大法(江湖失传已久的武林秘籍)

Numpy those things

莱斯大学胡侠团队 ICML 2022 杰出论文: 新型图数据增强方法 G-Mixup|附作者对话
随机推荐
2022年PMP考试应该注意些什么?
Nacos面试题
莱斯大学胡侠团队 ICML 2022 杰出论文: 新型图数据增强方法 G-Mixup|附作者对话
Mysql——分组统计
NAACL 2022 | 具有元重加权的鲁棒自增强命名实体识别技术
小程序实现手写左右翻页和动态修改横向滚动条位置
特殊变量 (SQL)
Locking and Concurrency Control (4)
Gartner发布,年度Challenger!
Red and blue against experience sharing: CS from kill posture
Mysql开启binlog
Alibaba最新神作——1015页分布式全栈手册太香了
[C Language Brush Questions] Three Questions for Getting Started with Pointers | String Length, String Copy, Two Number Swap
Flink SQL搭建实时数仓DWD层
golang源码分析(10)slice
Summary of CNN classic models [easy to understand]
金仓数据库KingbaseES安全指南--6.13. 关于身份验证的常见问题
uniapp引入vantUI库
NoSQL之redis缓存雪崩、穿透、击穿概念解决办法
In the idea to create a web project _idea deployment of the web project