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

Oracle

add_months

Returns the datetime resulting from adding integer_exp months to date_exp.

Syntax
add_months ( date_exp, integer_exp ) 

ascii

Returns a number representing the ascii code value of the leftmost character of string_exp, e.g. ascii('A') is 65.

Syntax
ascii ( string_exp ) 

ceil

Returns the smallest integer greater than or equal to numeric_exp.

Syntax
ceil ( numeric_exp ) 

char_length

Returns the number of characters in string_exp.

Syntax
char_length ( string_exp ) 

chr

Returns the character that has the ASCII code value specified by integer_exp. integer_exp should be between 0 and 255.

Syntax
chr ( integer_exp ) 

concat

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

Syntax
concat ( string_exp1, string_exp2 ) 

decode

DECODE compares expr to each search value one by one. If expr is equal to a search, then returns the corresponding result. If no match is found, then returns default. If default is omitted, then returns null.

Syntax
decode ( expr , search , result [, search , result]... [, default] ) 

dump

Returns internal representation of 'expr' with the format of numeric_exp1 starting from position numeric_exp2 for numeric_exp3.

Syntax
dump ( expr [ , numeric_exp1 [ , numeric_exp2 [ , numeric_exp3 ] ] ] ) 

greatest

Returns the greatest value in a list of expressions.

Syntax
greatest ( exp_list ) 

initcap

Returns string_exp, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by white space or characters that are not alphanumeric.

Syntax
initcap ( string_exp ) 

instr

Searches string_exp1 from the integer_exp1 position for the (integer_exp2)th occurance of string_exp2. If integer_exp1 is negative then the search is backwards from the end of string_exp1. Returns an integer indicating the position of string_exp2.

Syntax
instr ( string_exp1, string_exp2 [ , integer_exp1 [ , integer_exp2 ] ] ) 

instrb

Searches string_exp1 from the integer_exp1 position for the (integer_exp2)th occurance of string_exp2. If integer_exp1 is negative then the search is backwards from the end of string_exp1. The result returned indicates the position (byte number) where search was found.

Syntax
instrb ( string_exp1, string_exp2 [ , integer_exp1 [ , integer_exp2 ] ] ) 

least

Returns the least value in a list of expressions.

Syntax
least ( exp_list ) 

length

Returns the number of characters in string_exp.

Syntax
length ( string_exp ) 

lengthb

Returns the number of bytes in string_exp.

Syntax
lengthb ( string_exp ) 

lpad

Returns string_exp1 padded to length integer_exp with occurrences of string_exp2. If string_exp1 is longer than integer_exp then returns the appropriate portion of string_exp1.

Syntax
lpad ( string_exp1, integer_exp [ , string_exp2 ] ) 

ltrim

Returns string_exp1, with leading characters removed up to the first character not in string_exp2, e.g. ltrim('xyxXxyAB', 'xy') returns 'XxyAB'.

Syntax
ltrim ( string_exp1 [ , string_exp2 ] ) 

months_between

Returns the number of months from date_exp1 to date_exp2. If date_exp1 is later than date_exp2 then the result will be a positive number. The days and time portion of the difference are ignored, i.e. the months are not rounded, except if date_exp1 and date_exp2 are the last days of a month.

Syntax
months_between ( date_exp1, date_exp2 ) 

new_time

Returns the Datetime in timezone 'new_tz' for 'datetime' in 'old_tz' timezone. 'Old_tz' and 'new_tz' can be one of 'AST', 'ADT', 'BST', 'BDT', 'CST', 'CDT', 'EST', 'EDT', 'HST', 'HDT', 'MST', 'MDT', 'NST', 'PST', 'PDT', 'YST' or 'YDT'.

Syntax
new_time ( datetime_exp, old_tz, new_tz ) 

next_day

Returns the datetime of the first weekday named by string_exp that is later than datetime_exp. The return value has the same hours, minutes, and seconds as datetime_exp.

Syntax
next_day ( datetime_exp, string_exp ) 

nls_initcap

Returns string_exp1 with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited by white space or characters that are not alphanumeric. string_exp2 specifies the sorting sequence.

Syntax
nls_initcap ( string_exp1 [ , string_exp2 ] ) 

nls_lower

Returns string_exp1 with all letters in lowercase. string_exp2 specifies the sorting sequence.

Syntax
nls_lower ( string_exp1 [ , string_exp2 ] ) 

nls_upper

Returns string_exp1 with all letters in uppercase. string_exp2 specifies the sorting sequence.

Syntax
nls_upper ( string_exp1 [ , string_exp2 ] ) 

nvl

If exp is null (missing) returns constant. If exp is not null returns exp. Valid for numeric_exp, string_exp, date_exp, and time_exp.

Syntax
nvl ( exp, constant ) 

replace

Replaces all occurrences of string_exp2 in string_exp1 with string_exp3. If string_exp3 is not specified then it replaces all occurrences with null (ie: removes all occurances of string_exp2).

Syntax
replace ( string_exp1, string_exp2 [ , string_exp3 ] ) 

round

Returns numeric_exp rounded to the nearest value integer_exp places right of the decimal point. If integer_exp is negative, numeric_exp is rounded to the nearest value absolute (integer_exp) places to the left of the decimal point, e.g., round (125, -1) rounds to 130.

Syntax
round ( numeric_exp [ , integer_exp ] ) 

rpad

Returns string_exp1 right-padded to length integer_exp with occurrences of string_exp2. If string_exp1 is longer than integer_exp then returns the appropriate portion of string_exp1. If string_exp2 is not specified then spaces are used.

Syntax
rpad ( string_exp1, integer_exp [ , string_exp2 ] ) 

rtrim

Returns string_exp1, with final characters removed after the last character not in string_exp2, e.g. rtrim('ABxXxyx', 'xy') returns 'ABxX'. If string_exp2 is not specified it removes th final space characters.

Syntax
rtrim ( string_exp1 [ , string_exp2 ] ) 

sign

Returns an indicator of the sign of numeric_exp: +1 if numeric_exp is positive, 0 if zero or -1 if negative.

Syntax
sign ( numeric_exp ) 

soundex

Returns a character string containing the phonetic representation of string_exp.

Syntax
soundex ( string_exp ) 

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 ] ) 

substrb

Same as substr, except that the arguments are expressed in bytes (not characters).

Syntax
substrb ( string_exp, numeric_exp1 [ , numeric_exp2 ] ) 

{sysdate}

Returns a datetime value representing the current date and time of the computer that the database software runs on.

Syntax
{ sysdate } 

to_char

Returns the string representation of exp with the format of string_exp. exp can either be a date value or a numeric value.

Syntax
to_char ( exp [ , string_exp ] ) 

to_date

Converts string_exp1 to a datetime value as specified by the format string_exp2. string_exp3 specifies format elements such as language.

Syntax
to_date ( string_exp1 [ , string_exp2 [ , string_exp3 ] ] ) 

to_number

Converts string_exp1 to a numeric value as specified by the format string_exp2. string_exp3 specifies format elements such as currency information.

Syntax
to_number ( string_exp1, string_exp2, string_exp3 ) 

translate

Returns string_exp1, with all occurrences of each character in string_exp2 replaced by its corresponding character in string_exp3.

Syntax
translate ( string_exp1, string_exp2, string_exp3 ) 

trunc

Truncates the date_exp using the format specified by string_exp. For example, if string_exp is 'YEAR' then date_exp is truncated to the first day of the year.

Syntax
trunc ( date_exp, string_exp ) 

trunc

Truncates digits from numeric_exp1 using numeric_exp2 as the precision.

Syntax
trunc ( numeric_exp1, numeric_exp2 ) 

{user}

Returns the username of the current Oracle user.

Syntax
{ user } 

vsize

Returns the number of bytes in the internal representation of 'exp'. 'exp' must be a string expression.

Syntax
vsize ( exp ) 

Oracle Math

log

Returns the logarithm of numeric_exp2 to the base numeric_exp1.

Syntax
log ( numeric_exp1, numeric_exp2 ) 

Oracle 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_exp2 / 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 ) 

cosh

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

Syntax
cosh ( numeric_exp ) 

sin

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

Syntax
sin ( numeric_exp ) 

sinh

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

Syntax
sinh ( numeric_exp ) 

tan

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

Syntax
tan ( numeric_exp ) 

tanh

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

Syntax
tanh ( numeric_exp )