The {update}
and {/update} directive pair delimits the update section. An input
file can contain multiple update sections. Update sections can be
nested within the
success,
norows, and
error sections of an update section and within the
eachrow and
norows sections
of a query section. Each update section must contain at least one
SQL section and can contain multiple sections. The update section
can also contain a success section and an error section.
-
The SQL section is delimited by
the
{sql} and {/sql} directive pair and contains the SQL statement to be sent to the
SAS/SHARE server. The allowed SQL statements are ALTER, CREATE, DELETE,
DROP, INSERT, and UPDATE.
Note: The Webmaster can disable
these SQL statements by specifying the
READONLY option in the htmSQL configuration file.
-
The success section is delimited
by the
{success}
and {/success} directive pair and contains instructions on what to do if the SQL
statement returns with a return code of zero. The success section
can contain a
norows section for instances where no rows are updated.
-
The error section is delimited
by the
{error} and {/error} directive pair and contains instructions on what to do
if the SQL statement returns with a return code that is not equal
to zero.
An update section can
also contain a
{library} directive and other text, including HTML and variable references.
The text can appear before sections, between sections, and after sections.