Home > Advanced Programming Techni... > Using Collections > Merging Collections
Previous |
Next |
You can merge members of a collection with values passed in a set of arrays. By using the p_init_query
argument, you can create a collection from the supplied query.
Note that if the collection exists, the following occurs:
Rows in the collection not in the arrays will be deleted.
Rows in the collection and in the arrays will be updated.
Rows in the array and not in the collection will be inserted.
Any attribute value exceeding 4,000 characters will be truncated to 4,000 characters. Table: Available Arguments for Merging Collections describes the available arguments you can use when merging collections.
Available Arguments for Merging Collections
Argument | Description |
---|---|
|
Name of the collection. See Also: "About Collection Naming" |
|
Identifies the sequence number of the member to be merged. |
|
Array of first attribute values to be merged. Maximum length is 4,000 characters. If the maximum length is greater, it will be truncated to 4,000 characters. The count of elements in the P_C001 PL/SQL table is used as the total number of items across all PL/SQL tables. For example, if P_C001.count = 2 and P_C002.count = 10, only 2 members will be merged. Note that if P_C001 is null, an application error will be raised. |
|
Attribute of |
|
Use this argument to identify rows the merge function should ignore. This argument identifies an row as null. Null rows are automatically removed from the collection. |
|
Use this argument with the |
|
Use the query defined by this argument to create a collection if the collection does not exist. |