Oracle 切割字符查询

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‘, ‘,‘, ‘‘)));

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

时间: 2024-10-22 03:53:48

Oracle 切割字符查询的相关文章

Oracle 分割字符查询

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 LEV

oracle 字典表查询

1.oracle 字典表查询 /*显示当前用户*/ show user 在sql plus中可用,在pl sql中不可用 /*查看所有用户名*/ select username,user_id,created from all_users; /*查看当前用户的用户详情*/ select username,user_id,account_status,lock_date,expiry_date,default_tablespace,temporary_tablespace,created,init

oracle之sql查询二

此文章为http://huangsir007.blog.51cto.com/6159353/1854818该片的后续 关于数据库语言查询: SQL> show parameter nls_language; NAME                                 TYPE        VALUE ------------------------------------ ----------- ------------------------------ nls_languag

Oracle EBS-SQL (SYS-11):查询系统已打的PATCH.sql

select a.patch_name,         b.DRIVER_FILE_NAME,         c.language,         b.creation_datefrom apps.ad_applied_patches    a,        apps.ad_patch_drivers      b,        apps.ad_patch_driver_langs c where a.applied_patch_id = b.applied_patch_id     

Oracle EBS-SQL (SYS-12):查询各Profile的设置情况.sql

SELECT pro.profile_option_name, pro.user_profile_option_name, lev.level_type TYPE, --lev.level_code, lev.level_name, prv.profile_option_value FROM apps.fnd_profile_options_vl pro, applsys.fnd_profile_option_values prv, (SELECT 10001 level_id, 'Site'

Oracle EBS-SQL (SYS-13):查询DBA在系统中的打补丁信息.SQL

查询DBA在系统中的打补丁信息 1. select * from ad_patch_drivers          /*查看已经打了哪些Patch*/ 2. select * from ad_patch_runs             /*查看打patch的时间,目录等信息*/ 3. select * from ad_patch_driver_langs /*查看patch的语言*/ 4. 查询补丁名称.语言.打Patch的开始时间.打Patch的完成时间: SELECT driver.dr

Oracle中字符缓冲区相关错误

一.buffer overflow,limit of 10000 bytesdeclarebeginfor c in 1..1000 loop dbms_output.put_line('测试测试测试');end loop;end;缓冲区默认大小为10000 bytes.循环1000次就一共有6000个汉字,也就是12000 bytes.在SQL窗口的输出标签页中设置缓冲区大小. 二.数字或值错误:字符串缓冲区太小declarev varchar2(100):='';beginfor c in

Oracle中分页查询语句

Oracle分页查询语句使我们最常用的语句之一,下面就为您介绍的Oracle分页查询语句的用法,如果您对此方面感兴趣的话,不妨一看. Oracle分页查询语句基本上可以按照本文给出的格式来进行套用.Oracle分分页查询格式: SELECT * FROM ( SELECT A.*, ROWNUM RN FROM (SELECT * FROM TABLE_NAME) A WHERE ROWNUM <= 40 ) WHERE RN >= 21 其中最内层的查询SELECT * FROM TABLE

ORACLE数据库常用查询二

ORACLE数据库常用查询 1.查看表空间对应数据文件情况: SQL> SELECT TABLESPACE_NAME,FILE_NAME,BYTES/1024/1024 MB,AUTOEXTENSIBLE FROM DBA_DATA_FILES; TABLESPACE_NAME FILE_NAME MB AUTOEXTENSIBLE ------------------------------ ---------------------------------------------------