Click or drag to resize
SQL Utility Functions

[This is preliminary documentation and is subject to change.]

TOPICA Basic contains a number of functions that are used to facilitate the dynamic construction of SQL query statements (used mainly in reports).

All these functions are actually string manipulation functions. All parameters and all result are of type String.

TOPICA Basic SQL functions

Name

Description

SQL_StringEqual

Returns string to be used in SQL query for comparing field with supplied value.

SQL_OrgUnitDescendant

Returns string to be used in SQL query for checking if one org.unit is dscendant of some other org.unit.

TOPICA Basic Function SQL_DateInterval

Returns string to be used in SQL query for checking if field value is within supplied date interval.

TOPICA Basic Function SQL_DateTimeInterval

Returns string to be used in SQL query for checking if field vaaue is within supplied date/time interval.

TOPICA Basic Function SQL_And

Returns an expression with AND between the subexpression.

TOPICA Basic Function SQL_Or

Returns an expression with OR bewteen the subexpression.

TOPICA Basic Function SQL_Where

Returns string to be used in SQL query for constructing WHERE-clauses.

SQL_Format

Convert values ogf different types to SQL constants.