The usage of sqlupdate
is
stilts <stilts-flags> sqlupdate db=<jdbc-url> user=<value> password=<value> select=<select-stmt> assign=<col>=<expr> progress=true|falseIf you don't have the
stilts
script installed,
write "java -jar stilts.jar
" instead of
"stilts
" - see Section 3.
The available <stilts-flags>
are listed
in Section 2.1.
For programmatic invocation,
the Task class for this
command is uk.ac.starlink.ttools.task.SqlUpdate
.
Parameter values are assigned on the command line as explained in Section 2.3. They are as follows:
assign = <col>=<expr>
(Assignment[])
<colname>=<expr>
where <colname>
is the name of a column
in the SQL table and
<expr>
is the text of an expression using
STILTS's expression language, as described in Section 10.
SQL table column names or $ID
identifiers may be used as variables in the usual way.
This parameter may be supplied more than once to effect multiple assignments, or multiple assignments may be made by separating them with semicolons in the value of this parameter.
db = <jdbc-url>
(Connection)
jdbc:<subprotocol>:<subname>
- the details are database- and driver-dependent.
Consult Sun's JDBC documentation and that for the particular
JDBC driver you are using for details.
Note that the relevant driver class will need to be on your
classpath and referenced in the jdbc.drivers
system property as well for the connection to be made.
password = <value>
(String)
progress = true|false
(Boolean)
[Default: true
]
select = <select-stmt>
(String)
SELECT
")
of the SELECT statement to identify which rows undergo
updates.
user = <value>
(String)
[Default: mbt
]