DECLARE
|
nt_base nt_numtype := nt_numtype(1, 2, 9, 11, 7, 6, 3, 4, 2, 6, 5, 18);
|
nt_dist nt_numtype := nt_numtype();
|
FUNCTION op_nt(i_nt IN nt_numtype) RETURN VARCHAR2 IS
|
s_Nested_tab VARCHAR2(200);
|
BEGIN
|
FOR idx IN i_nt.FIRST .. i_nt.LAST LOOP
|
IF idx < i_nt.COUNT THEN
|
s_nested_tab := s_nested_tab||i_nt(idx)||', ';
|
ELSE
|
s_nested_tab := s_nested_tab||i_nt(idx);
|
END IF;
|
END LOOP;
|
RETURN s_nested_tab;
|
END op_nt;
|
BEGIN
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||'CARDINALITY of nt_base ['||CARDINALITY(nt_base)||']');
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||' nt_base ['||nt_base.COUNT||'] -> ('||op_nt(nt_base)||')');
|
nt_dist := nt_dist MULTISET UNION DISTINCT nt_base;
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||'CARDINALITY of nt_dist ['||CARDINALITY(nt_dist)||']');
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||' nt_dist ['||nt_dist.COUNT||'] -> ('||op_nt(nt_dist)||')');
|
nt_dist := nt_dist MULTISET UNION SET(nt_base);
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||'CARDINALITY of nt_dist ['||CARDINALITY(nt_dist)||']');
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||' nt_dist ['||nt_dist.COUNT||'] -> ('||op_nt(nt_dist)||')');
|
nt_base := SET(nt_base);
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||'CARDINALITY of nt_base ['||CARDINALITY(nt_base)||']');
|
DBMS_OUTPUT.PUT_LINE(CHR(10)||' nt_base ['||nt_base.COUNT||'] -> ('||op_nt(nt_base)||')');
|
END;
|
/
|