|
SYNOPSIS
<SQL [options] "SQL command" [...]>
... statements ...
</SQL>
DESCRIPTION The SQL statement executes the given Texis SQL command
(with a ``;'' appended if needed). The returned rows' fields
are assigned to the Vortex variables of the same name, one field per
variable value. For each result row returned by the command, the
corresponding variables are updated, and the statements inside the
SQL block are executed.
The field variables returned by SQL behave just like
LOOP variables (see p. ), in that only the
current value returned is visible inside the SQL loop. This
allows easy iteration of result rows, yet retains all rows for future
use.
Flags/attributes that may be given before the SQL statement include:
If a BREAK statement is encountered inside the loop, the loop
is exited at that point, as if the SQL command generated no more rows.
CAVEATS If a SQL statement that modifies a row is nested inside a SQL selecting
from the same table then care may need to be used to ensure that the same
row is not updated multiple times. This is most likely to occur when the
outer SQL is selecting without an index, and the update may increase the
size of the record. The size increase may move the record, and it may
then reappear in the select.
Copyright © Thunderstone Software Last updated: Wed Sep 10 11:16:28 EDT 2008
|