ROW constructor function
ROW constructor is a complex function used to explicitly generate rows of values that can be assigned to fields in an output message.
Syntax
A ROW consists of a sequence of named values. When assigned to a field reference it creates that sequence of named values as child fields of the referenced field. A ROW cannot be assigned to an array field reference.
Examples
Example 1
SET OutputRoot.XMLNS.Data = ROW('granary' AS bread,
'riesling' AS wine,
'stilton' AS cheese);
produces:
<Data>
<bread>granary</bread>
<wine>riesling</wine>
<cheese>stilton</cheese>
</Data>
Example 2
Given the following
XML input message body:
<Proof>
<beer>5</beer>
<wine>12</wine>
<gin>40</gin>
</Proof>
the following ESQL: SET OutputRoot.XMLNS.Data = ROW(InputBody.Proof.beer,
InputBody.Proof.wine AS vin,
(InputBody.Proof.gin * 2) AS special);
produces
the following result: <Data>
<beer>5</beer>
<vin>12</vin>
<special>80</special>
</Data>
Because the values in this case are derived from field references
that already have names, it is not necessary to explicitly provide a name
for each element of the row, but you might choose to do so.