CreateArrayAny function
Syntax
CreateArrayAny([paramlist])
Where paramlist is an arbitrary-length list of values in the form:
param1 [, param2] ...
Description
Use the CreateArrayAny function to construct an array whose elements are of data type ANY and returns a reference to it.
The CreateArrayAny function uses flattening and promotion as required to convert subsequent values into suitable elements of the array.
If you do not specify any parameters with CreateArrayAny, it's the same as using the CreateArray function without any parameters.
If you do not know how many values are needed in a SQL statement until runtime, you can use an array of any to supply the values.
Parameters
| Parameter | Description |
|---|---|
|
paramlist |
Specify a list of values to be used as the elements of the array. |
Returns
Returns a reference to an array of ANY.
Example
Local array of any &ArrayAny = CreateArrayAny(1, 2, "hi", "there");
Local array of array of any &AAAny = CreateArray(CreateArrayAny(1, 2), CreateArrayAny("hi"), "there");
&ArrayAny is a one dimensional array with four elements: 1, 2, "hi" and "there". All the elements have the data type any.
&AAAny is a two-dimensional array with three elements: a one-dimensional array with 1 and 2 as elements, a one-dimensional array with "hi" as its element, and a one-dimensional array with only the element "there". The last parameter to the array was promoted to a one-dimensional array.