Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 

 

EXECSQL

Executes an inline SQL statement.

Syntax

Parameters

SQL (required)
SQL commands to execute.

LIST (required)
Name of list to contain resultset.

LIMIT (optional)
Maximum number of rows to be retrieved. If LIMIT is omitted or if the LIMIT value is set to less than or equal to 0, all records from the SQL command are returned.

TABLE (optional)
A comma-separated list of table to cache or synchronize against.

Description

The EXECSQL tag executes an inline SQL statement. Because the SQL statement is inline and not from the SystemSQL table, you must set the variable tablename before the call; otherwise, an error can occur. Furthermore, tablename must exist in the database prior to calling EXECSQL. The resultset is cached against the table indicated by the value of tablename.

Note

If the limit is less than or equal to 0, then no limit exists and the entire recordset is returned.

This tag supports multiple table caching. You provide a comma-separated list of tables via the TABLE parameter. The first table is the "primary" table, that is, the resultset is cached based on that table's caching rules.

errno

The possible values of errno include:

Value
Description
-101
No rows found.
-102
Empty column.
-103
No such table.
-104
No table definition.
-106
Bad parameter

Example

This example selects headline from the table FTX1EE17FWB:

See Also

CALLSQL
SELECTTO
SQLEXP

  Home > Contents > Index >

FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.