码迷,mamicode.com
首页 > 数据库 > 详细

Oracle 切割字符查询

时间:2018-02-15 14:15:21      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:edit   ase   str   strong   where   level   post   查询   dual   

Oracle 切割字符查询

select *
  from view_psbaseinfo
 where DECODE(‘410782001125,411100000043‘,
              ‘‘,
              NULL,
              ‘410782001125,411100000043‘) IS NULL
    or PSCODE in
       (SELECT REGEXP_SUBSTR(‘410782001125,411100000043‘, ‘[^,]+‘, 1, LEVEL) AS PSCODE
          FROM DUAL
        CONNECT BY LEVEL <=
                   LENGTH(‘410782001125,411100000043‘) + 1 -
                   LENGTH(REPLACE(‘410782001125,411100000043‘, ‘,‘, ‘‘)));

Oracle 切割字符查询

标签:edit   ase   str   strong   where   level   post   查询   dual   

原文地址:https://www.cnblogs.com/zhchoutai/p/8449473.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!