To use Cognos product documentation, you must enable JavaScript in your browser.

Informix

cardinality

Returns the number of elements in a collection column (SET, MULTISET, LIST).

Syntax
cardinality ( string_exp ) 

char_length

Returns the number of logical characters (which can be distinct from the number of bytes in some East Asian locales) in string_exp.

Syntax
char_length ( string_exp ) 

concat

Returns a string that is the result of concatenating string_exp1 to string_exp2.

Syntax
concat ( string_exp1, string_exp2 ) 

date

Returns the date value of either string_exp or date_exp or int_exp.

Syntax
date ( string_exp | date_exp | int_exp ) 

day

Returns an integer that represents the day of the month.

Syntax
day ( date_exp ) 

extend

The extend function adjusts the precision of a DATETIME or DATE expression. The expression cannot be a quoted string representation of a DATE value. If you do not specify first and last qualifiers, the default qualifiers are YEAR TO FRACTION(3). If the expression contains fields that are not specified by the qualifiers, the unwanted fields are discarded. If the first qualifier specifies a larger (that is, more significant) field than what exists in the expression, the new fields are filled in with values returned by the CURRENT function. If the last qualifier specifies a smaller field (that is, less significant) than what exists in the expression, the new fields are filled in with constant values. A missing MONTH or DAY field is filled in with 1, and the missing HOUR to FRACTION fields are filled in with 0.

Syntax
extend ( date_exp , ' { ' YEAR TO SECOND ' } ' ) 
Example
EXTEND (some_date_column , {YEAR TO SECOND} ) 

hex

Returns the hexadecimal encoding of an integer integer_exp.

Syntax
hex ( integer_exp ) 

initcap

Returns string_exp, with the first letter of each word in uppercase, all other letters in lowercase. With this function, a word begins after any character other than a letter. Thus, in addition to a blank space, symbols such as commas, periods, colons, and so on, introduce a new word.

Syntax
initcap ( string_exp ) 

length

Returns the number of bytes in string_exp, which is not including any trailing blank spaces. For BYTE or TEXT string_exp, LENGTH returns the full number of bytes, including any trailing blank spaces.

Syntax
length ( string_exp ) 

lpad

Returns a copy of string_exp1 that is left-padded (string_exp2) to the total number of characters specified by integer_exp. The sequence of string_exp2 occurs as many times as necessary to make the return string the length specified by integer_exp.

Syntax
lpad ( string_exp1, integer_exp, string_exp2 ) 

mdy

Returns a type DATE value with three expressions that evaluate to integers that represent the month(integer_exp1), day(integer_exp2), and year(integer_exp3).

Syntax
mdy ( integer_exp1, integer_exp2, integer_exp3 ) 

month

Returns an integer corresponding to the month portion of date_exp.

Syntax
month ( date_exp ) 

nvl

Returns the value of exp1 if exp1 is not NULL. If exp1 is NULL, then the value of exp2 is returned.

Syntax
nvl ( exp1, exp2 ) 

octet_length

Returns the number of bytes in string_exp, including any trailing spaces.

Syntax
octet_length ( string_exp ) 

replace

Returns a copy of string_exp1 in which every occurrence of string_exp2 is replaced by string_exp3. If you omit the string_exp3 option, every occurrence of string_exp2 is omitted from the return string.

Syntax
replace ( string_exp1, string_exp2 [ , string_exp3 ] ) 

round

Returns the rounded value of an numeric_exp. If you omit the integer_exp, the value is rounded to zero digits or to the units place. The digit range of 32 (+ and -) refers to the entire decimal value.

Syntax
round ( numeric_exp [ , integer_exp ] ) 

rpad

Returns a copy of string_exp1 that is right-padded (string_exp2) to the total number of characters specified by integer_exp. The sequence of string_exp2 occurs as many times as necessary to make the return string the length specified by integer_exp.

Syntax
rpad ( string_exp1, integer_exp, string_exp2 ) 

substr

Returns the substring of string_exp that starts at position integer_exp1. The first character in string_exp is at position 1. integer_exp2 can be used to select fewer characters, by default it selects character to the end of the string.

Syntax
substr ( string_exp, integer_exp1 [ , integer_exp2 ] ) 

to_char

Returns the character string of date_exp with the specified string_exp formatting. You can use this function only with built-in data types.

Syntax
to_char ( date_exp, string_exp ) 

to_date

Returns the string_exp1 as a date according to the date format you specify in the string_exp2 parameter. If string_exp1 is NULL, then a NULL value is returned.

Syntax
to_date ( string_exp1, string_exp2 )  

trunc

Returns the truncated value of a numeric_exp. If you omit integer_exp, the value is truncated to zero digits or to the unit’s place. The digit limitation of 32 (+ and -) refers to the entire decimal value.

Syntax
trunc ( numeric_exp [ , integer_exp ] ) 

weekday

Returns an integer that represents the day of the week; zero (0) represents Sunday, one (1) represents Monday, and so on.

Syntax
weekday ( date_exp ) 

year

Returns a four-digit integer that represents the year.

Syntax
year ( date_exp ) 

Informix Math

log10

Returns the log of a numeric_exp to base 10.

Syntax
log10 ( numeric_exp ) 

logn

Returns the natural logarithm of a numeric_exp.

Syntax
logn ( numeric_exp ) 

root

Returns the root value of a numeric_exp. Requires at least one numeric argument (the radians argument). If only the numeric_exp1 is supplied, the value 2 is used as a default value for numeric_exp2; 0 cannot be used as the value of numeric_exp2.

Syntax
root ( numeric_exp1[ , numeric_exp2 ] ) 

Informix Trigonometry

acos

Returns the arccosine of numeric_exp in radians. The arccosine is the angle whose cosine is numeric_exp.

Syntax
acos ( numeric_exp ) 

asin

Returns the arcsine of numeric_exp in radians. The arcsine is the angle whose sine is numeric_exp.

Syntax
asin ( numeric_exp ) 

atan

Returns the arctangent of numeric_exp in radians. The arctangent is the angle whose tangent is numeric_exp.

Syntax
atan ( numeric_exp ) 

atan2

Returns the arctangent of the x and y coordinates specified by numeric_exp1 and numeric_exp2, respectively, in radians. The arctangent is the angle whose tangent is numeric_exp1.

Syntax
atan2 ( numeric_exp1, numeric_exp2 ) 

cos

Returns the cosine of numeric_exp where numeric_exp is an angle expressed in radians.

Syntax
cos ( numeric_exp ) 

sin

Returns the sine of numeric_exp where numeric_exp is an angle expressed in radians.

Syntax
sin ( numeric_exp ) 

tan

Returns the tangent of numeric_exp where numeric_exp is an angle expressed in radians.

Syntax
tan ( numeric_exp )