Jive uses ODBC for access to SQL databases. Basic SQL commands are supported - select, update, delete, insert plus a connect command. connect can be in embedded commands. The others are external commands - enclosed in braces. select is a control structure command and requires a terminating {end}, like if and while.
select commands can be labelled by preceding the select with a sumbol and a colon. The label can be used for qualification. For example,
Customers:
<ul>
{cust:select * from customer}
<li>{cust.name}
{end}
</ul>
Jive variables can be referenced in the select, using syntax
like embedded SQL. A Jive variable in a select command is
prefixed with a colon (:). Qualification and subscripting may be used.
For example,
{var state = 'CA'}
Customers in {state}:
<ul>
{cust:select * from customer where state = :state}
<li>{cust.name}
{end}
</ul>
The update, delete and insert command can use Jive variables like select. Jive variables in SQL commands are preceded with a colon. For example,
{var salary = 25000.00, id = 1475}
{update employee set salary = :salary where employee_id = :id}