oracle将两段字符串拆分后筛选去重--谨记

select a.con

  from (select REGEXP_SUBSTR(check_child, '[^,]+', 1, rownum) as con

          from (select wm_concat(check_child) as check_child

                  from land_fj_insp_check_option

                where option_name = '屋面'

                  and classtify = '10')

        CONNECT BY ROWNUM <= LENGTH(check_child) -

                  LENGTH(REPLACE(check_child, ',', '')) + 1) a

where a.con in

      (select data_text

          from mf_dict_data

        where dict_id = 'dict.fj.wumMaterial'

          and data_value in

              (select REGEXP_SUBSTR(wum_Material, '[^,]+', 1, rownum)

                  from (select wum_Material

                          from land_fj_house

                        where device_id ='4D3EAA2D44A447F98CBD4390B328F079')

                CONNECT BY ROWNUM <=

                          LENGTH(wum_Material) -

                          LENGTH(REPLACE(wum_Material, ',', '')) + 1))

你可能感兴趣的:(oracle将两段字符串拆分后筛选去重--谨记)