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



Executes a simple query from a table.



FROM (required)
Name of the Sites table to query. The table must be registered in the SystemInfo table. This table verifies security and caches result sets when the cc.cacheResults property is enabled.

WHAT (optional)
List of columns to return. The format of WHAT_CRITERIA is a comma-separated list of column names.

LIST (required)
Name of the list to contain the resultset.

WHERE (optional)
Comma-separated list of table columns to select against. For each item in the WHERE string, the value of the corresponding variable is used to construct a SQL WHERE clause. All the elements in the comma-separated list must be variables. When you specify a datetime field in the WHERE_CRITERIA, Sites uses the cc.datepicture property to convert the supplied datetime to the proper format.

ORDERBY (optional)
Orders the rows returned by the query. The format of ORDERBY_EXPRESSION is a comma-separated list of column names. You can also override the default sort order by specifying ascending/descending with a (potentially) database specific command like:

ORDERBY="colname1 desc,colname2 asc"

LIMIT (optional)
Maximum number of rows to return.

Note that if the LIMIT parameter is omitted or is less than or equal to 0, then no limit exists and the entire recordset is returned.


The SELECTTO tag executes a simple query from a table. The results are stored in a list.

Error Numbers

The possible values of errno include:

No search results.
One of the elements in the WHERE clause was not a variable. (All elements in the WHERE clause must be variables.)


The following example selects all columns from the SystemInfo table and puts the results into a list called RS for later use.

The next example demonstrates a comma-separated list. It selects records in the visitor table where firstname = Fred and lastname = Smith. It then loops through the list if the list is created and has records.

See Also


  Home > Contents > Index >

Oracle XML Tag Reference
Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.