Net.Data Reference Guide
Purpose
You can use LIST variables to build a delimited list of values. Using LIST
variables can be helpful 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------+
Context
Can be found in these contexts:
Parameters
- %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 a
tabulator, new line character, or a space.
- variable reference
- Returns the value of a previously defined 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 previously defined FUNCTION blocks with specified
arguments. See Function call (@) for syntax and examples.
- variable name
- The name of a variable. An alphabetic or numeric string beginning with an
alphabetic character or underscore and containing any combination of
alphabetic, numeric, or underscore characters. See Variable Name for syntax information.
Restrictions
Can contain these elements:
- Variable references
- Function calls
- Strings
Examples
Example 1:
%DEFINE{
DATABASE="custcity"
%LIST " OR " conditions
cond1="Sao Paulo"
cond2="Seattle"
cond3="Shanghai"
whereClause=Conditions ? "WHERE $(conditions)" : ""
%}
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]