SRL Functions

The SRL functions description is divided into several chapters according to the nature of a function, i.e.

On the functions arguments type

Note that a function can accept a value of a specified type which corresponds to those of the PolyAnalyst column types.

Sometimes PolyAnalyst types do not correspond to those of programming languages, e.g. a Boolean value is expressed as a Yes/No column.

For example such a function

function_name(yes/no)

will demand the use of yes/no or True/False values when writing a query though the result colum will always be shown only with the use of yes/no ones.

About arguments values

Though one may encounter an example of the function_name(some value) structure, it is needed to remember that most of the SRL functions can accept not only a literal (i.e. a specific value), but an entire column, i.e. all values of the specified column.

For example:

upper("usa")

will return "USA" as a literal value.

For example:

upper([USA])

will return all values of the USA column in the upper case.

Note that a column name is advised to be always used in brackets, i.e. [name of the column to use].

About optional arguments

Some functions accept optional arguments. If an argument is optional, it will be shown in square brackets and a comma to separate the arguments:

num(string or text[, language:=])

Note that in this case, the square brackets only show that the arguments are optional. When writing a real query, they are not used:

num("1234", language:=eng)

However, if you use a column as a mandatory argument, it is always recommended to use the column name in square brackets:

num([column name], language:=eng)

In this case, the function will be applied to all rows of the column.

About functions date/time arguments

Note that Date/time values used for the Date/time functions are shown with literals only for the sake of clarity.

For example:

day(#2001-01-18#)

uses the #year-month-day format.

It is always possible to use a Date/time column as well.

For example:

day([column of Date/time type])

uses the [name of the column to use] format to process all rows of the column.

About the SRL/PDL functions with the same name

Note that such SRL functions as andn(), orn() and macro() are different from those of the PDL ones, i.e. they are not the same, though having the identical names.