About Oracle REGEXP_LIKE

Oracle sql like多个条件函数:

REGEXP_LIKE(字段名, ‘(匹配串1|匹配串2|…)’) ; //全模糊匹配
REGEXP_LIKE(字段名, ‘^(匹配串1|匹配串2|…)’) ; //右模糊匹配
REGEXP_LIKE(字段名, ‘(匹配串1|匹配串2|…)$’) ; //左模糊匹配


CREATE OR REPLACE VIEW DWT_ARRAY_TT_2019 AS
SELECT /*+ PARALLEL( T , 4 )*/
        FUN_GET_DAY_TIMEKEY(T.PERIOD_DATE) AS DAY_TIMEKEY
       ,T.EQP_ID
       ,T.STEP_ID
       ,T.PRODUCT_ID
       ,T.GLS_TYPE
       ,T.GLS_ID
       ,T.TACT_TIME
FROM DWT_TACT_TIME_A T,DWD_EQP_AF T1
WHERE T.FACTORY='ARRAY'
AND T.EQP_ID LIKE '%CL'
AND REGEXP_LIKE(T.EQP_ID,'^(SPM-|SPM-|SPI-|VDN-|CAK-|WSD-|WGT-|WIG-|WIT-|WRS-|WUK-|XGB-|XSB-|XOB-)')
AND REGEXP_LIKE(T.PRODUCT_ID,'^(D41|D53|D61)')
AND T.TACT_TIME<=300
AND T.PERIOD_DATE>=TO_DATE('20190101080000','yyyymmddhh24miss')
AND T.PERIOD_DATE< TO_DATE('20191210080000','yyyymmddhh24miss')
AND T.GLS_TYPE !='DM';
相关推荐
©️2020 CSDN 皮肤主题: 精致技术 设计师:CSDN官方博客 返回首页