| |
| |
| |
| with t_origin as (select 1000 || ',' || |
| 2000 || ',' || |
| 3000 || ',' || |
| 4000 || ',' || |
| 5000 || ',' || |
| 6000 numbers |
| from dual), |
| t_origin_ as (select regexp_substr(t.numbers, '[^,]+', 1, levels.column_value) as numbers |
| from t_origin t, |
| table (cast(multiset(select level from dual connect by level <= length(regexp_replace(t.numbers, '[^,]+')) + 1) as |
| sys.OdciNumberList)) levels), |
| t_target as (select 1000 || ',' || |
| 2000 || ',' || |
| 3000 || ',' || |
| 4000 numbers |
| from dual), |
| t_target_ as (select regexp_substr(t.numbers, '[^,]+', 1, levels.column_value) as numbers |
| from t_target t, |
| table (cast(multiset(select level from dual connect by level <= length(regexp_replace(t.numbers, '[^,]+')) + 1) as |
| sys.OdciNumberList)) levels) |
| select numbers||'-'||'minus' from (select numbers from t_origin_ minus select numbers from t_target_) union all |
| select numbers||'-'||'union' from (select numbers from t_origin_ union select numbers from t_target_) union all |
| select numbers||'-'||'intersect' from (select numbers from t_origin_ intersect select numbers from t_target_); |