Static Public Member Functions | |
_.Library.Float | ABS (_.Library.String val) |
ABS returns the absolute value, which is always zero or a positive number. More... | |
_.Library.String | ALPHAUP (_.Library.String stringexp) |
ALPHAUP returns the Alphaup collation of the passed in value. More... | |
_.Library.Float | CEILING (_.Library.String val) |
CEILING is a scalar numeric function that returns the smallest integer greater than or equal to a given numeric expression. More... | |
_.Library.String | COLLATE (_.Library.String stringexp, _.Library.String transSpec, _.Library.Integer maxlen) |
COLLATE returns the COLLATE collation of the passed in value. More... | |
_.Library.String | CONVERT (_.Library.String expr, _.Library.String convto, _.Library.String convfrom) |
CONVERT is a SQL function that converts a given expression to a specified data type. More... | |
_.Library.Date | DATE (_.Library.String exp) |
DATE is a date/time function that returns the date portion of the given date or timestamp expression. More... | |
_.Library.TimeStamp | DATEADD (_.Library.String datepart, _.Library.Numeric val, _.Library.String dateexp) |
DATEADD is a general date/time function that returns a date calculated by adding a certain number of date parts (such as hours or days) to a specified timestamp. More... | |
_.Library.Integer | DATEDIFF (_.Library.String datepart, _.Library.String startdate, _.Library.String enddate) |
DATEDIFF is a general date/time function that returns the interval between two dates. More... | |
_.Library.String | DATENAME (_.Library.String datepart, _.Library.String dateexp) |
DATENAME is a general date/time function that returns a CHARACTER STRING containing the name of the specified date part of a date/time value. More... | |
_.Library.Integer | DATEPART (_.Library.String datepart, _.Library.String dateexp) |
DATEPART is a general date/time function that returns an INTEGER representing the specified date/time part of the specified date/time expression. More... | |
_.Library.Integer | DATETRUNC (_.Library.String datepart, _.Library.String tdate) |
DATETRUNC is a general date/time function that truncates a date to. More... | |
_.Library.String | DAYNAME (_.Library.String dateexp) |
DAYNAME is a date/time function that returns a character string containing the name of the day in a given date or datetime expression. More... | |
_.Library.Integer | DAYOFMONTH (_.Library.String dateexp) |
DAYOFMONTH is a date/time function that returns an integer from 1 to 31 that corresponds to the day of the month in a given date expression. More... | |
_.Library.Integer | DAYOFWEEK (_.Library.String dateexp) |
DAYOFWEEK is a date/time function that returns an integer from 1 to 7 that corresponds to the day of the week in a given date expression. More... | |
_.Library.Integer | DAYOFYEAR (_.Library.String dateexp) |
DAYOFYEAR is a date/time function that returns an integer from 1 to 366 that corresponds to the day of the year in a given date expression. More... | |
_.Library.Integer | FLOOR (_.Library.Numeric val) |
FLOOR is a numeric function that returns the largest integer less than or equal to a given numeric expression. More... | |
_.Library.Integer | HOUR (_.Library.String timeexp) |
HOUR is a date/time function that returns an integer from 0 to 23 that corresponds to the hour component in a given date-time expression. More... | |
_.Library.Integer | INSTR (_.Library.String string, _.Library.String substring, _.Library.Integer position, _.Library.Integer occurrence) |
INSTR is a function that searches string for substring and returns an integer indicating the position of the character in string that is the first character of this occurrence. More... | |
_.Library.Date | LASTDAY (_.Library.String dateexp) |
LASTDAY is a scalar date/time function that returns the <class>Library.Date</class> value of the last day of the month for a given date expression. More... | |
_.Library.Integer | MINUTE (_.Library.String timeexp) |
MINUTE is a date/time function that returns an integer from 0 to 59 that corresponds to the minute component in a given date-time expression. More... | |
_.Library.Integer | MONTH (_.Library.String dateexp) |
MONTH is a date/time function that returns an integer from 1 to 12 that corresponds to the month in a given date expression. More... | |
_.Library.String | MONTHNAME (_.Library.String dateexp) |
MONTHNAME is a date/time function that returns a character string containing the name of the month in a given date expression. More... | |
_.Library.String | MVR (_.Library.String stringexp) |
MVR returns the MVR collation of the passed in value. More... | |
_.Library.Integer | QUARTER (_.Library.String dateexp) |
QUARTER is a date/time function that returns an integer from 1 to 4 that corresponds to the quarter of the year in a given date expression. More... | |
_.Library.Integer | SECOND (_.Library.String timeexp) |
SECOND is a date/time function that returns an integer from 0 to 59 that corresponds to the second component in a given date-time expression. More... | |
_.Library.String | SQLCODE (_.Library.Integer SQLCODE) |
This entry point can be used to return the description of an SQLCODE value. More... | |
_.Library.String | SQLSTRING (_.Library.String stringexp, _.Library.Integer maxlen) |
SQLSTRING returns the SqlString collation of the passed in value. More... | |
_.Library.String | SQLUPPER (_.Library.String stringexp, _.Library.Integer maxlen) |
SQLUPPER returns the SqlUpper collation of the passed in value. More... | |
_.Library.String | STRING (_.Library.String stringexp, _.Library.Integer maxlen) |
STRING returns the String collation of the passed in value. More... | |
_.Library.String | TOCHAR (_.Library.String expr, _.Library.String format) |
TOCHAR is a general SQL string function that converts a given date, timestamp, or number value to a string. More... | |
_.Library.String | TODATE (_.Library.String dateexp, _.Library.String format) |
TODATE is a general SQL string function that converts a given string expression to a value of DATE data type. More... | |
_.Library.String | TOPOSIXTIME (_.Library.String stringexp, _.Library.String format) |
TOPOSIXTIME is a general SQL string function that converts a given string expression to a logical value of a <class>Library.PosixTime</class> data type. More... | |
_.Library.String | TOTIMESTAMP (_.Library.String stringexp, _.Library.String format) |
TOTIMESTAMP is a general SQL string function that converts a given string expression to a value of TIMESTAMP data type. More... | |
_.Library.String | TRUNCATE (_.Library.String stringexp, _.Library.Integer maxlen) |
TRUNCATE returns the Truncate collation of the passed in value. More... | |
_.Library.String | UPPER (_.Library.String stringexp) |
UPPER returns the Upper collation of the passed in value. More... | |
_.Library.Integer | WEEK (_.Library.String dateexp) |
WEEK is a date/time function that returns an integer from 1 to 53 that corresponds to the week of the year in a given date expression. More... | |
_.Library.Integer | YEAR (_.Library.String dateexp) |
YEAR is a date/time function that returns an integer in the range 1840-9999 that indicates the year in a given date expression. More... | |
![]() | |
_.Library.String | Help (_.Library.String method) |
This is a helper class that is used by the various SYSTEM classes to provide a Help method. More... | |
|
static |
ABS returns the absolute value, which is always zero or a positive number.
$SYSTEM.SQL.Functions.ABS(numeric-expression)
ABS returns the same data type as numeric-expression. If numeric-expression is not a number (for example, the string 'abc') ABS returns 0. ABS returns NULL when passed a NULL value.
Also see the ABS reference page.
|
static |
ALPHAUP returns the Alphaup collation of the passed in value.
|
static |
CEILING is a scalar numeric function that returns the smallest integer greater than or equal to a given numeric expression.
$SYSTEM.SQL.Functions.CEILING(numeric-expression)
Also see the CEILING reference page.
|
static |
COLLATE returns the COLLATE collation of the passed in value.
$SYSTEM.SQL.Functions.COLLATE(stringexp,transSpec,maxlen)
|
static |
CONVERT is a SQL function that converts a given expression to a specified data type.
$SYSTEM.SQL.Functions.CONVERT(expr,convto,convfrom)
CONVERT is a SQL function that converts expression expr from type convfrom to the specified data type convto.
The convfrom value is expected to be a Logical value for SQL_DATE and SQL_TIME. When converting from SQL_DATE, SQL_POSIXTIME, or SQL_TIME to SQL_TIMESTAMP, the input value is expected to be a logical <class>Library.Date</class>, <class>Library.PosixTime</class>, or <class>Library.Time</class> value. When converting from SQL_VARCHAR to SQL_TIME, the input value is expected to be an ODBC <class>Library.Time</class> formatted value. When converting from SQL_VARCHAR to SQL_DATE, the input value is expected to be an ODBC <class>Library.Date</class> formatted value. When converting from SQL_DATE, SQL_POSIXTIME, or SQL_TIME to SQL_VARCHAR, the returned value will contain the ODBC format of the <class>Library.Date</class>, <class>Library.PosixTime</class>, or <class>Library.Time</class> value.
Also see the CONVERT reference page.
|
static |
DATE is a date/time function that returns the date portion of the given date or timestamp expression.
$SYSTEM.SQL.Functions.DATE(exp)
If "" (null) is passed in, "" (null) is returned. If exp is not numeric, it is assumed the expression is in <class>Library.TimeStamp</class> logical format. Note, that if a string value is passed in as exp, it is expected that the value is a logical <class>Library.TimeStamp</class> format, and not $Horolog format. To convert $Horolog to DATE, use $SYSTEM.SQL.Functions.DATE(+$HOROLOG),
Also see the DATE reference page.
|
static |
DATEADD is a general date/time function that returns a date calculated by adding a certain number of date parts (such as hours or days) to a specified timestamp.
$SYSTEM.SQL.Functions.DATEADD(datepart,numeric-exp,dateexp)
Also see the DATEADD reference page.
|
static |
DATEDIFF is a general date/time function that returns the interval between two dates.
$SYSTEM.SQL.Functions.DATEDIFF(datepart,startdate,enddate)
Startdate is subtracted from enddate to determine how many datepart intervals are between the two dates.
The startdate and enddate parameters can be in any of the following formats:
If the year is given as two digits, a sliding window is checked to interpret the date. The system default for the sliding window can be set via the DATE utility, which is documented only in the "Legacy Documentation" chapter in Using InterSystems Documentation.
Also see the DATEDIFF reference page.
|
static |
DATENAME is a general date/time function that returns a CHARACTER STRING containing the name of the specified date part of a date/time value.
$SYSTEM.SQL.Functions.DATENAME(datepart,dateexp)
The dateexp parameter can be in any of the following formats:
If the year is given as two digits, a sliding window is checked to interpret the date. The system default for the sliding window can be set via the DATE utility, which is documented only in the "Legacy Documentation" chapter in Using InterSystems Documentation.
Also see the DATENAME reference page.
|
static |
DATEPART is a general date/time function that returns an INTEGER representing the specified date/time part of the specified date/time expression.
$SYSTEM.SQL.Functions.DATEPART(datepart,dateexp)
dateexp must contain a value of type datepart.
The dateexp parameter can be in any of the following formats:
If the year is given as two digits, a sliding window is checked to interpret the date. The system default for the sliding window can be set via the DATE utility, which is documented only in the "Legacy Documentation" chapter in Using InterSystems Documentation.
Also see the DATEPART reference page.
|
static |
DATETRUNC is a general date/time function that truncates a date to.
$SYSTEM.SQL.Functions.DATETRUNC(datepart,dateexp)
The dateexp parameter can be in any of the following formats:
If the year is given as two digits, a sliding window is checked to interpret the date. The system default for the sliding window can be set via the DATE utility, which is documented only in the "Legacy Documentation" chapter in Using InterSystems Documentation.
|
static |
DAYNAME is a date/time function that returns a character string containing the name of the day in a given date or datetime expression.
$SYSTEM.SQL.Functions.DAYNAME(dateexp)
If the year is given as two digits, a sliding window is checked to interpret the date. The system default for the sliding window can be set via the DATE utility, which is documented only in the "Legacy Documentation" chapter in Using InterSystems Documentation.
Also see the DAYNAME reference page.
|
static |
DAYOFMONTH is a date/time function that returns an integer from 1 to 31 that corresponds to the day of the month in a given date expression.
$SYSTEM.SQL.Functions.DAYOFMONTH(dateexp)
Also see the DAYOFMONTH reference page.
|
static |
DAYOFWEEK is a date/time function that returns an integer from 1 to 7 that corresponds to the day of the week in a given date expression.
$SYSTEM.SQL.Functions.DAYOFWEEK(dateexp)
The returned values represent these days: 1 - Sunday, 2 - Monday, 3 - Tuesday, 4 - Wednesday, 5 - Thursday, 6 - Friday, 7 - Saturday
The default is that Sunday is the first day of the week.
This default can be overridden by specifying SET ^SYS("sql","sys","day of week")=n, where n values are 1=Monday through 7=Sunday.
Thus, to reset the default specify SET ^SYS("sql","sys","day of week")=7.
The day of week setting can also be defined on a per-namespace basis by adding an additional namespace subscript, for example:
SET ^SYS("sql","sys","day of week","USER")=n, where n values are 1=Monday through 7=Sunday.
InterSystems IRIS also supports the ISO 8601 standard for determining the day of the week, week of the year, and other date settings. This standard is principally used in European countries. The ISO 8601 standard begins counting the days of the week with Monday. To activate ISO 8601, SET ^SYS("sql","sys","week ISO8601")=1; to deactivate, set it to 0. If week ISO8601 is activated and "day of the week" is undefined or set to the default (7=Sunday), the ISO 8601 standard overrides the default. If "day of the week" is set to any other value, it overrides week ISO8601 for DAYOFWEEK.
Also see the DAYOFWEEK reference page.
|
static |
DAYOFYEAR is a date/time function that returns an integer from 1 to 366 that corresponds to the day of the year in a given date expression.
$SYSTEM.SQL.Functions.DAYOFYEAR(dateexp)
Also see the DAYOFYEAR reference page.
|
static |
FLOOR is a numeric function that returns the largest integer less than or equal to a given numeric expression.
$SYSTEM.SQL.Functions.FLOOR(dateexp)
Also see the FLOOR reference page.
|
static |
HOUR is a date/time function that returns an integer from 0 to 23 that corresponds to the hour component in a given date-time expression.
$SYSTEM.SQL.Functions.HOUR(timeexp)
Also see the HOUR reference page.
|
static |
INSTR is a function that searches string for substring and returns an integer indicating the position of the character in string that is the first character of this occurrence.
$SYSTEM.SQL.Functions.INSTR(string,substring,position,occurrence)
Also see the INSTR reference page.
|
static |
LASTDAY is a scalar date/time function that returns the <class>Library.Date</class> value of the last day of the month for a given date expression.
$SYSTEM.SQL.Functions.LASTDAY(dateexp)
LASTDAY returns the date of the last day of the specified month as a <class>Library.Date</class> value. Leap years differences are calculated.
LASTDAY returns 0 when an invalid date is specified: the day or month as zero; the month greater than 12; or the day larger than the number of days in that month on that year.
|
static |
MINUTE is a date/time function that returns an integer from 0 to 59 that corresponds to the minute component in a given date-time expression.
$SYSTEM.SQL.Functions.MINUTE(timeexp)
Also see the MINUTE reference page.
|
static |
MONTH is a date/time function that returns an integer from 1 to 12 that corresponds to the month in a given date expression.
$SYSTEM.SQL.Functions.MONTH(dateexp)
Also see the MONTH reference page.
|
static |
MONTHNAME is a date/time function that returns a character string containing the name of the month in a given date expression.
$SYSTEM.SQL.Functions.MONTHNAME(dateexp)
Also see the MONTHNAME reference page.
|
static |
MVR returns the MVR collation of the passed in value.
$SYSTEM.SQL.Functions.MVR(stringexp)
MVR performs collation translations needed for MultiValue
|
static |
QUARTER is a date/time function that returns an integer from 1 to 4 that corresponds to the quarter of the year in a given date expression.
$SYSTEM.SQL.Functions.QUARTER(dateexp)
Also see the QUARTER reference page.
|
static |
SECOND is a date/time function that returns an integer from 0 to 59 that corresponds to the second component in a given date-time expression.
$SYSTEM.SQL.Functions.SECOND(timeexp)
Also see the SECOND reference page.
|
static |
This entry point can be used to return the description of an SQLCODE value.
Parameters:
Examples:
This method can also be called as a Stored Procedure named SYSTEM_SQL.Functions_SQLCODE(SQLCODE)
|
static |
SQLSTRING returns the SqlString collation of the passed in value.
$SYSTEM.SQL.Functions.SQLSTRING(stringexp,maxlen)
|
static |
SQLUPPER returns the SqlUpper collation of the passed in value.
$SYSTEM.SQL.Functions.SQLUPPER(stringexp,maxlen)
SQLUPPER converts stringexp to a format that is sorted as a (case-insensitive) upper-case string. SQLUPPER converts all alphabetic characters to uppercase, strips trailing white space (spaces, tabs, and so on) from the string, then adds one leading blank space to the beginning of the string. It collates any value containing only white space (spaces, tabs, and so on) as the SQL empty string. SQL Empty string is represented as $Char(0) in ObjectScript, which collated as SqlUpper is " "_$Char(0).
|
static |
STRING returns the String collation of the passed in value.
$SYSTEM.SQL.Functions.STRING(stringexp,maxlen)
STRING converts all alphabetic characters are uppercased; all punctuation characters are removed, except the comma; a single space is added to the beginning of the expression. It collates any value containing only white space (spaces, tabs, and so on) as the SQL empty string. SQL Empty string is represented as $Char(0) in ObjectScript, which collated as String is " "_$Char(0).
|
static |
TOCHAR is a general SQL string function that converts a given date, timestamp, or number value to a string.
$SYSTEM.SQL.Functions.TOCHAR(expr,format)
The first use of TOCHAR is to convert a date, time, or datetime expression to a string.
The second use of TOCHAR is to convert a number to a string.
Also see the TO_CHAR reference page.
|
static |
TODATE is a general SQL string function that converts a given string expression to a value of DATE data type.
$SYSTEM.SQL.Functions.TODATE(expr,format)
The use of TODATE is to specify the input format of a string value containing a date to be converted to a Logical <class>Library.Date</class> value. The format of expr is specified in the format parameter. format will be used as a key to translate expr into a valid <class>Library.Date</class> logical value.
Also see the TODATE reference page.
|
static |
TOPOSIXTIME is a general SQL string function that converts a given string expression to a logical value of a <class>Library.PosixTime</class> data type.
$SYSTEM.SQL.Functions.TOPOSIXTIME(stringexp,format)
The use of TOPOSIXTIME is to specify the input format of a string value containing a datetime to be converted to a Logical <class>Library.PosixTime</class> value. The format of stringexp is specified in the format parameter. format will be used as a key to translate stringexp into a valid <class>Library.PosixTime</class> logical value. If an error occurs during the execution of TOPOSIXTIME, the function will return a value of 0 and an error message will be defined in the msg variable.
Also see the TO_POSIXTIME reference page.
|
static |
TOTIMESTAMP is a general SQL string function that converts a given string expression to a value of TIMESTAMP data type.
$SYSTEM.SQL.Functions.TOTIMESTAMP(stringexp,format)
The use of TOTIMESTAMP is to specify the input format of a string value containing a datetime to be converted to a Logical <class>Library.TimeStamp</class> value. The format of stringexp is specified in the format parameter. format will be used as a key to translate stringexp into a valid <class>Library.TimeStamp</class> logical value. If an error occurs during the execution of TOTIMESTAMP, the function will return a value of 0 and an error message will be defined in the msg variable.
Also see the TO_TIMESTAMP reference page.
|
static |
TRUNCATE returns the Truncate collation of the passed in value.
$SYSTEM.SQL.Functions.TRUNCATE(stringexp,maxlen)
Also see the TRUNCATE reference page.
|
static |
UPPER returns the Upper collation of the passed in value.
$SYSTEM.SQL.Functions.UPPER(stringexp)
UPPER converts all alphabetic characters to upper case (i.e., the UPPER format). Note that punctuation is not changed.
Also see the UPPER reference page.
|
static |
WEEK is a date/time function that returns an integer from 1 to 53 that corresponds to the week of the year in a given date expression.
$SYSTEM.SQL.Functions.WEEK(dateexp)
Also see the WEEK reference page.
|
static |
YEAR is a date/time function that returns an integer in the range 1840-9999 that indicates the year in a given date expression.
$SYSTEM.SQL.Functions.YEAR(dateexp)
Also see the YEAR reference page.