Statement: Direktes SQL
Input
<Any element name>
<statement resulttag="result element name" timezone="time zone"
format="date format">
<sql>
SQL statement
</sql>
</statement>
</Any element name>
The following rules apply to each <statement/> element:
The optional attribute
timezonespecifies a timezone according tojava.util.TimeZone, e. g.GMT+2, see http://docs.oracle.com/javase/1.5.0/docs/api/java/util/TimeZone.html.The optional attribute
formatspecifies a date format according tojava.text.SimpleDateFormat.It contains at least one
<sql/>element with an SQL statement.
If you use characters within the SQL statement or for the values or data of the table columns that have a meaning in XML, mask the SQL statement with surrounding CDATA block, e.g. <![CDATA[ SELECT * FROM TABLE WHERE ID<1 ]]> or <rowset><row><name><!CDATA[
XML character “<“ in CDATA element]]></name></row></rowset>.
This ensures that the characters in the CDATA element are not interpreted as XML, but as data for the adapter.
<select>
<statement resulttag="result" timezone="UTC" format="dd.MM.yyyy">
<sql>
<![CDATA[SELECT * FROM JMS_USERS]]>
</sql>
</statement>
</select>
Output
If the SQL statement was executed successfully, the database connection component will output an XML document with the following structure containing the query response as a string:
<Data>
<Result element name>
<Feld1><!--Value--></Feld1>
<Feldn><!--Value--></Feldn>
</Result element name>
</Data>
For SELECT statements used to access database tables with column names that do not represent a valid XML name, synthetic element names are created within the result XML document, in order to ensure that the XML document is well-formed.