Example of the Use of XML SQLExport

Previous Next

See Also

The following example illustrates the use of XML.SQLExport, and describes the output of the export process.

INVOKE XML.SQLExport

WITH

SELECT 'yes' useioformats , t1.col1 a, t2.col1 b, decode(t1.col1, t2.col1, 'b', 'c' ) decoded

FROM mytable t1, yourtable t2

WHERE t1.id = t2.id

RESULTS IN:

<SQLXMLExport>

   <Meta>

   <OutputExpressions>

   <Column TableName="MYTABLE" TableAlias="t1" Name="COL1" Alias="a"/>

   <Column TableName="YOURTABLE" TableAlias="t2" Name="COL1" Alias="b"/>

   <Expression Alias="decoded">decode(t1.col2, t2.col2, "b" ) </Expression>

   </OutputExpressions>

   </Meta>

   <Rows>

   <Row>

   <Field Alias="a">1</Field>

   <Field Alias="b">1</Field>

   <Field Alias="decoded">b</Field>

   </Row>

   <Row>

   <Field Alias="a">4</Field>

   <Field Alias="b">2</Field>

   <Field Alias="decoded">c</Field>

   </Row>

   </Rows>

</SQLXMLExport>

For a detailed description of this XML Output, see "XML Output Description".