WITH TEST AS (SELECT 'AAA' c1, '3' c2 FROM dual UNION ALL SELECT 'BBB', '2' FROM dual UNION ALL SELECT 'CCC', '4' FROM dual) select c1 || '_' || level from test connect by level <= to_number(c2) and c1 = prior c1 and prior dbms_random.value is not null;
WITH TEST AS (SELECT 'AAA' c1, '3' c2 FROM dual UNION ALL SELECT 'BBB', '2' FROM dual UNION ALL SELECT 'CCC', '4' FROM dual) SELECT DISTINCT c1||'_'||LEVEL cc FROM test CONNECT BY level<=to_number(c2) ORDER BY cc
(SELECT 'AAA' c1, '3' c2
FROM dual
UNION ALL
SELECT 'BBB', '2'
FROM dual
UNION ALL
SELECT 'CCC', '4' FROM dual)
select c1 || '_' || level
from test
connect by level <= to_number(c2)
and c1 = prior c1
and prior dbms_random.value is not null;
(SELECT 'AAA' c1, '3' c2 FROM dual UNION ALL
SELECT 'BBB', '2' FROM dual UNION ALL
SELECT 'CCC', '4' FROM dual)
SELECT DISTINCT c1||'_'||LEVEL cc FROM test
CONNECT BY level<=to_number(c2) ORDER BY cc