CREATE OR REPLACE TYPE WWT.WWT_XXWMS_CHAR_LIST_NRR IS TABLE OF CHAR(1 CHAR);
WITH wc
AS (SELECT inventory_item_id, segment2
FROM mtl_system_items_b
WHERE inventory_item_id IN (18736091,18736071,18791648,18689552,12492301,18695455
,616432,7304252,212663)
AND organization_id = 101
)
SELECT t.inventory_item_id,
CAST( c.COLUMN_VALUE AS CHAR(1 CHAR) ) AS character,
COUNT(1) AS frequency
FROM wc t,
TABLE(
CAST(
MULTISET(
SELECT SUBSTR( t.segment2, LEVEL, 1 )
FROM DUAL
WHERE REGEXP_LIKE( SUBSTR( t.segment2, LEVEL, 1 ), '[^a-zA-Z0-9]' )
CONNECT BY LEVEL <= LENGTH( t.segment2 )
) AS WWT.WWT_XXWMS_CHAR_LIST_NRR
)
) c
GROUP BY t.inventory_item_id, c.COLUMN_VALUE
/
WITH wc
AS (SELECT inventory_item_id, segment2
FROM mtl_system_items_b
WHERE inventory_item_id IN (18736091,18736071,18791648,18689552,12492301,18695455
,616432,7304252,212663)
AND organization_id = 101
)
SELECT t.inventory_item_id,
CAST( c.COLUMN_VALUE AS CHAR(1 CHAR) ) AS character,
COUNT(1) AS frequency
FROM wc t,
TABLE(
CAST(
MULTISET(
SELECT SUBSTR( t.segment2, LEVEL, 1 )
FROM DUAL
WHERE REGEXP_LIKE( SUBSTR( t.segment2, LEVEL, 1 ), '[^a-zA-Z0-9]' )
CONNECT BY LEVEL <= LENGTH( t.segment2 )
) AS WWT.WWT_XXWMS_CHAR_LIST_NRR
)
) c
GROUP BY t.inventory_item_id, c.COLUMN_VALUE
/
WITH msib_wc
AS (SELECT segment2
FROM mtl_system_items_b
WHERE inventory_item_id IN (18736091,18736071,18791648,18689552,12492301,18695455)
AND organization_id = 101
)
SELECT CAST( c.COLUMN_VALUE AS CHAR(1 CHAR) ) AS character,
COUNT(1) AS frequency
FROM msib_wc ,
TABLE(
CAST(
MULTISET(
SELECT SUBSTR( msib_wc.segment2, LEVEL, 1 )
FROM DUAL
WHERE REGEXP_LIKE( SUBSTR( msib_wc.segment2, LEVEL, 1 ), '[^a-zA-Z0-9]' )
CONNECT BY LEVEL <= LENGTH( msib_wc.segment2 )
) AS WWT.WWT_XXWMS_CHAR_LIST_NRR
)
) c
GROUP BY c.COLUMN_VALUE
/
AS (SELECT segment2
FROM mtl_system_items_b
WHERE inventory_item_id IN (18736091,18736071,18791648,18689552,12492301,18695455)
AND organization_id = 101
)
SELECT CAST( c.COLUMN_VALUE AS CHAR(1 CHAR) ) AS character,
COUNT(1) AS frequency
FROM msib_wc ,
TABLE(
CAST(
MULTISET(
SELECT SUBSTR( msib_wc.segment2, LEVEL, 1 )
FROM DUAL
WHERE REGEXP_LIKE( SUBSTR( msib_wc.segment2, LEVEL, 1 ), '[^a-zA-Z0-9]' )
CONNECT BY LEVEL <= LENGTH( msib_wc.segment2 )
) AS WWT.WWT_XXWMS_CHAR_LIST_NRR
)
) c
GROUP BY c.COLUMN_VALUE
/
No comments:
Post a Comment