Reference
Purpose
Builds a delimited list of values. You can use the LIST statement
when you construct SQL queries with multiple items like those found in some
WHERE or HAVING clauses.
Syntax
.--------------------------.
V |
>>-%LIST--"-----+--------------------+--+---"----variable name--><
+-string-------------+
+-variable reference-+
'-function call------'
Values
- %LIST
- The keyword that specifies that variables are to be used to build a
delimited list of values.
- string
- Any sequence of alphabetic and numeric characters and punctuation, except
the new-line character.
- variable reference
- Returns the value of a variable and is specified with $ and (). For
example: if VAR='abc', then $(VAR) returns
the value 'abc'. See Variable Reference for syntax information.
- function call
- Invokes one or more FUNCTION or MACRO_FUNCTION blocks, or a
Net.Data built-in function with specified arguments. See Function Call (@) for syntax and examples.
- variable name
- A name that identifies a variable. See Variable Name for syntax information.
Context
The LIST statement can be found in these contexts:
Restrictions
The LIST statement can contain these elements:
- Comment block
- Variable references
- Function calls
- Strings
Examples
Example 1: A list of variables
%DEFINE{
DATABASE="custcity"
%LIST " OR " conditions
conditions="cond1='Sao Paolo'"
conditions="cond2='Seattle'"
conditions="cond3='Shanghai'"
whereClause=conditions ? "WHERE $(conditions)" : ""
%}
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]