12. Report-Writer Statements : Report Setup Statements : .Delimid Statement--Enable Recognition of Delimited Identifiers : .Delimid with QUEL Query
 
Share this page                  
.Delimid with QUEL Query
Delimited identifiers cannot be used in a QUEL query. However, you can use delimited identifiers and the .delimid statement in non‑query portions of a report specification that contains a QUEL query, as shown in the following example.
This example creates a temporary table with columns "aaaa" and "delim col," then retrieves and prints values from column "aaaa" that match the value entered in response to a prompt for the variable "my_smallint."
.name sql_setup
.delimid
.declare my_smallint = smallint with prompt 'Enter
        selection key numeric value: '
.setup
       create table my_temp_table (aaaa smallint,
           "delim col" varchar(4));
       insert into my_temp_table values (123, 'abcd');
.query
       range of mtt is my_temp_table
       retrieve (mtt.aaaa, quote = "\"")
           where mtt.aaaa = "$my_smallint"
.detail
       .println 'Key Value: ',aaaa
.cleanup
       drop table my_temp_table;
       create table my_temp_table (aaaa smallint,
           "delim col" varchar(4));
       insert into my_temp_table values (123, 'abcd');
       drop table my_temp_table;