12. Report-Writer Statements : Report Setup Statements : .Delimid Statement--Enable Recognition of Delimited Identifiers : Example
 
Share this page                  
Example
The following example shows use of the .delimid statement in a report specification that creates a temporary table with columns "aaaa" and "delim col," then selects 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
     select aaaa from my_temp_table where aaaa =
        '$my_smallint'
.detail
     .println 'Key Value: ',aaaa
.cleanup
     drop table my_temp_table;