Adding array values to an array [message #262948] |
Tue, 28 August 2007 10:21  |
ronin10
Messages: 17 Registered: July 2007
|
Junior Member |
|
|
Is it possible to add array entries as in:
TYPE COLOR_AT IS TABLE OF VARCHAR2(10); --INDEX BY BINARY_INTEGER
----------------------------------------------------------------
v_set_color_a COLOR_AT;
----------------------------------------------------------------
v_set_color_a := COLOR_AT('Red','Green','Blue');
What is the syntax for adding more entries to my Color array set. Is it possible to use:
IF statment
THEN
v_set_color_a := COLOR_AT('Yellow');
END IF;
So that my array will look like this
v_set_color_a := COLOR_AT ('Red','Green','Blue','Yellow');
Is this possible in PL/SQL?
[Updated on: Tue, 28 August 2007 10:22] Report message to a moderator
|
|
|
|
|
|
|
|
Re: Adding array values to an array [message #263180 is a reply to message #262960] |
Wed, 29 August 2007 05:10  |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
v_set_color_a := v_set_color_a MULTISET UNION v_set_color_b;
Well, that's today's learning experience taken care of.
I've used Multiset to convert XML fragments into selectable data sources before, but I've never seen it used like this.
Aha - 10g adds a raft of new Multiset conditions and operators
|
|
|