sql

Description

Runs a sql query. If the sql job has results then they are avaialable as properties of the row or rows properties of this job.

Properties

NameDescriptionRequired
name A name, can be any text. No.
sql The sql query or dml statement to run. Yes.
connection The connection to use. Yes.
rows The results of the query. Read only.
updateCount The update count of any insert/update/delete statement. Read only.
row The result of a query when only one result is expected. Read only.
getRowCount The number of rows returned by the query. Read only.

Example

 <sequential>
   <sql id="query" connection="${vars.connection}">
     <sql>select text from greetings where style='nice'</sql>
   </sql>
   <echo text="${query.row.greeting}"/>
 <sequential>


(c) Rob Gordon 2005