06 2023 档案

摘要:1、去空白符SQL: SELECT regexp_replace(STR,'^\s*','*') AS "去掉左边空白符", regexp_replace(STR,'\s*$','*') AS "去掉右边空白符", regexp_replace(STR,'(^\s*)|(\s*$)','*') AS 阅读全文
posted @ 2023-06-30 20:38 每天进步多一点 阅读(400) 评论(0) 推荐(0) 编辑
摘要:1、一行 SELECT T.ID, REGEXP_SUBSTR(T.VALS, '[^,]+', 1, LEVEL) AS VAL FROM (SELECT '101' ID, 'A,B' VALS FROM DUAL) T CONNECT BY LEVEL <= REGEXP_COUNT(T.VA 阅读全文
posted @ 2023-06-30 20:31 每天进步多一点 阅读(415) 评论(0) 推荐(0) 编辑
摘要:1.去重思路:利用listagg会忽略null值的特点 2.上SQL: with T_TEST as ( select 'TOOL-001' EQPT_ID, 10493721 ENTITY_GROUP_RRN, 'JITAI-1' STATION_ID from dual union all se 阅读全文
posted @ 2023-06-29 20:23 每天进步多一点 阅读(925) 评论(0) 推荐(0) 编辑
摘要:1. wm_concat select t.type, to_char(wm_concat(t.id||' '||t.seq)) as id_seq, to_char(wm_concat(t.seq)) as seqs from ( select 'A' type, 'A001' id, 1 seq 阅读全文
posted @ 2023-06-29 18:50 每天进步多一点 阅读(494) 评论(0) 推荐(0) 编辑
摘要:--1.select语句 select * from openquery(sqllink, 'select * from hhp_user where chrusername = ''hhp'''); --或 select * from openquery(sqllink, 'select * fr 阅读全文
posted @ 2023-06-08 11:04 每天进步多一点 阅读(833) 评论(0) 推荐(1) 编辑
摘要:-- 声明游标;CURSOR cursor_name IS select_statement --For 循环游标 --(1)定义游标 --(2)定义游标变量 --(3)使用for循环来使用这个游标 declare --类型定义 cursor c_job is select empno,ename, 阅读全文
posted @ 2023-06-02 15:02 每天进步多一点 阅读(391) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示