SQL iQuery Script Built-in Function

Index

iComp / compi / compNoCase

Compares two values with letter case insensitivity.

The ICOMP() built-in functions returns true if value of parameter 1 equals the value of parameter 2 disregarding letter case.

Syntax

The ICOMP() built-in function compares the two parameters, while ignoring upper/lower case differences. It returns true if they match, otherwise it returns false. You could also use the SQL UPPER or LOWER function to accomplish the same thing.

Parameters

  1. The name of an iQuery Session Variable or a literal string expression
  2. The name of an iQuery Session Variable or a literal string expression

#default &street = 'Frisky Highview'

select corpAddr into &Addr
FROM compmast
WHERE region = '&REG'
LIMIT 1;

if iComp(&addr,&street);
// using the default location
else;
// using another region's address
endif;

The street name is retrieved from the COMPMAST table and stored in &ADDR. Then the value in &ADDR is compared to the value in &STREET using iComp. Upper/lower letter case differences are ignored while doing the comparison.