diff --git a/docs/manual/CoreTasks/sql.html b/docs/manual/CoreTasks/sql.html index 097ddefcc..8e719a26f 100644 --- a/docs/manual/CoreTasks/sql.html +++ b/docs/manual/CoreTasks/sql.html @@ -7,11 +7,11 @@

Sql

Description

-

Executes a series of sql statement via JDBC to a database. Statements can either be read in from a text file using the src attribute or from between the enclosing sql tags.

+

Executes a series of SQL statements via JDBC to a database. Statements can either be read in from a text file using the src attribute or from between the enclosing SQL tags.

-

Multiple statements can be set and each statement is delimited from the next use a semi-colon. Individual lines within the statements can be commented using either --, // or REM at the start of the line.

+

Multiple statements can be provided, separated by semi-colons (or the defined delimiter). Individual lines within the statements can be commented using either --, // or REM at the start of the line.

-

The auto-commit attribute specifies whether auto commit should be turned on or off whilst executing the statements. If auto-commit is turned on each statement will be executed and committed. If it is turned off the statements will all be executed as one transaction.

+

The autocommit attribute specifies whether auto-commit should be turned on or off whilst executing the statements. If auto-commit is turned on each statement will be executed and committed. If it is turned off the statements will all be executed as one transaction.

The onerror attribute specifies how to proceed when an error occurs during the execution of one of the statements. The possible values are: continue execution, only show the error; @@ -47,9 +47,14 @@ and abort execution and transaction and fail task.

src - File containing sql statements + File containing SQL statements Yes, unless statements enclosed within tags + + delimiter + String that separates SQL statements + No, default ";" + autocommit Auto commit flag for database connection (default false) @@ -107,7 +112,7 @@ on the same schema.

src - File containing sql statements + File containing SQL statements Yes, unless statements enclosed within tags @@ -129,7 +134,7 @@ The /> -

Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the sql statements contained within the file data.sql

+

Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the SQL statements contained within the file data.sql

<sql
     driver="org.database.jdbcDriver"
@@ -145,7 +150,8 @@ truncate table some_other_table;
 </sql>
 
-

Connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the two sql statements inserting data into some_table and truncating some_other_table

+

Connects to the database given in url as the sa + user using the org.database.jdbcDriver and executes the two SQL statements inserting data into some_table and truncating some_other_table

Note that you may want to enclose your statements in <![CDATA[ ... ]]> sections so you don't @@ -164,7 +170,7 @@ update some_table set column1 = column1 + 1 where column2 < 42; ]]></sql> -

The following connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the sql statements contained within the files data1.sql, data2.sql and data3.sql and then executes the truncate operation on some_other_table.

+

The following connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the SQL statements contained within the files data1.sql, data2.sql and data3.sql and then executes the truncate operation on some_other_table.

<sql
     driver="org.database.jdbcDriver"
@@ -180,7 +186,7 @@ update some_table set column1 = column1 + 1 where column2 < 42;
 </sql>
 
-

The following connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the sql statements contained within the file data.sql, with output piped to outputfile.txt, searching /some/jdbc.jar as well as the system classpath for the driver class.

+

The following connects to the database given in url as the sa user using the org.database.jdbcDriver and executes the SQL statements contained within the file data.sql, with output piped to outputfile.txt, searching /some/jdbc.jar as well as the system classpath for the driver class.

<sql
     driver="org.database.jdbcDriver"