Get distinct items from an array.
BugsJul 17 2006 — edited Jul 17 2006Guys,
I've a simple nested table as below:
DECLARE
TYPE Colors IS TABLE OF VARCHAR2(16);
rainbow Colors;
BEGIN
rainbow := Colors('Red','Red','Blue','Green','Yellow','Blue','Green');
dbms_output.put_line(rainbow(4));
END;
I'm looking for a generic program to store the the distinct items(comma seperated) of the array onto a string.
ie.
I need a string as below:
'Red,Blue,Green,Yellow'.
Can someone help me out?
Thanks,
Sujeet.