[Index]
sql-results-sheet
Writes SQL results to an output stream.
Property Summary
Example Summary
Example 1 |
A result sheet for multiple statements. |
Property Detail
dataOnly
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. Defaults to showing headings. |
Don't display headings.
empty
name
Configured By | ATTRIBUTE |
Access | READ_WRITE |
output
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. Defaults to stdout. |
The output stream to write results to.
to
Configured By | ELEMENT |
Access | READ_WRITE |
Examples
Example 1
A result sheet for multiple statements.
<oddjob>
<job>
<sql>
<connection>
<connection driver="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:mem:SQLResultsSheet_Example" username="sa" password=""/>
</connection>
<input>
<buffer>
create table FRUIT(
TYPE varchar(16),
VARIETY varchar(16),
COLOUR varchar(32),
SIZE double);
insert into FRUIT values ('Apple', 'Cox', 'Red and Green', 7.6);
insert into FRUIT values ('Orange', 'Jaffa', 'Orange', 9.245);
select * from FRUIT;
shutdown;
</buffer>
</input>
<results>
<sql-results-sheet/>
</results>
</sql>
</job>
</oddjob>
This writes the following to the console:
[0 rows affected, 16 ms.]
[1 rows affected, 0 ms.]
[1 rows affected, 0 ms.]
TYPE VARIETY COLOUR SIZE
------ ------- ------------- -----
Apple Cox Red and Green 7.6
Orange Jaffa Orange 9.245
[2 rows, 212 ms.]
[0 rows affected, 0 ms.]
(c) R Gordon Ltd 2005 - Present