Nonstop Database, HiRDB Version 9 UAP Development Guide
The following table lists the scalar functions that can be specified in the escape clause.
Table I-1 Scalar functions that can be specified in the escape clause
Scalar function | Standard format of scalar function | Format conversion#1 | ||
---|---|---|---|---|
Type2 | Type4 | Type4 (XDM/RD E2 is connected) | ||
Mathematical functions | ABS(number) | None | None | None |
ACOS(float) | None | MASTER.ACOS(float) | None | |
ASIN(float) | None | MASTER.ASIN(float) | None | |
ATAN(float) | None | MASTER.ATAN(float) | None | |
ATAN2(float1, float2) | None | MASTER.ATAN2(float1, float2) | None | |
CEILING(number)#2 | CEIL(number) 08-02 |
MASTER.CEIL(number) | None | |
COS(float) | None | MASTER.COS(float) | None | |
COT(float)#3, #4 | None | None | None | |
DEGREES(number) | None | MASTER.DEGREES(number) | None | |
EXP(float) | None | MASTER.EXP(float) | None | |
FLOOR(number) | None | MASTER.FLOOR(number) | None | |
LOG(float)#2 | LN(float) 08-02 |
MASTER.LN(float) | LN(float) | |
LOG10(float) | None | MASTER.LOG10(float) | None | |
MOD(integer1, integer2) | None | None | None | |
PI() | None | MASTER.PI() | None | |
POWER(number, power) | None | MASTER.POWER(number, power) | None | |
RADIANS(number) | None | MASTER.RADIANS(number) | None | |
RAND(integer)#3, #4 | None | None | None | |
ROUND(number, places) | None | MASTER.ROUND(number, places) | None | |
SIGN(number) | None | MASTER.SIGN(number) | None | |
SIN(float) | None | MASTER.SIN(float) | None | |
SQRT(float) | None | MASTER.SQRT(float) | None | |
TAN(float) | None | MASTER.TAN(float) | None | |
TRUNCATE(number, places)#2 | TRUNC(number, places) 08-02 |
MASTER.TRUNC(number, places) | None | |
String functions | ASCII(string) | None | MASTER.ASCII(string) | None |
BIT_LENGTH(string)#3 | None | None | None | |
CHAR(code)#2 | CHR(code) 08-02 |
MASTER.CHR(code) | None | |
CHAR[ACTER]_LENGTH(string)#3 | None | None | None | |
CONCAT(string1, string2)#3 | None | None | None | |
DIFFERENCE(string1, string2)#3 | None | None | None | |
INSERT(string1, start, length, string2)#2 | INSERTSTR(string1, start, length, string2) 08-02 |
MASTER.INSERTSTR(string1, start, length, string2) | None | |
LCASE(string)#2 | LOWER(string) 08-02 |
Same as at left | Same as at left | |
LEFT(string, count)#2 | LEFTSTR(string, count) 08-02 |
MASTER.LEFTSTR(string, count) | None | |
LENGTH(string) | None | None | None | |
LOCATE(string1, string2[, start])#2 | POSITION(string1 IN string2 [FROM start]) 08-02 |
Same as at left | Same as at left | |
LTRIM(string) | None | MASTER.LTRIM(string) | TRIM(LEADING FROM string) | |
OCTET_LENGTH(string)#3 | None | None | None | |
POSITION(character IN character) | None | None | None | |
REPEAT(string, count)#3 | None | None | None | |
REPLACE(string1, string2, string3) | None | MASTER.REPLACE(string1, string2, string3) | None | |
RIGHT(string, count)#2 | RIGHTSTR(string, count) 08-02 |
MASTER.RIGHTSTR(string, count) | None | |
RTRIM(string) | None | MASTER.RTRIM(string) | TRIM(TRAILING FROM string) | |
SOUNDEX(string)#3 | None | None | None | |
SPACE(count)#3 | None | None | None | |
SUBSTRING(string, start, length)#2 | SUBSTR(string, start, length) | Same as at left | Same as at left | |
UCASE(string)#2 | UPPER(string) | Same as at left | Same as at left | |
Time and date functions | CURDATE()#2 | CURRENT DATE | Same as at left | Same as at left |
CURRENT_DATE()#2 | CURRENT DATE | Same as at left | Same as at left | |
CURTIME()#2 | CURRENT TIME | Same as at left | Same as at left | |
CURRENT_TIME | None | None | None | |
CURRENT_TIME(time-precision)#2, #5 The time-precision argument specifies the precision of the fraction of a second in the return value. |
CURRENT TIME 08-02 |
Same as at left | None | |
CURRENT_TIMESTAMP[(timestamp-precision)] The timestamp-precision argument specifies the precision of the fraction of a second in the returned timestamp. |
None | None | None | |
DAYNAME(date) | None | MASTER.DAYNAME(date) | None | |
DAYOFMONTH(date)#3 | None | None | None | |
DAYOFWEEK(date) | None | MASTER.DAYOFWEEK(date) | None | |
DAYOFYEAR(date) | None | MASTER.DAYOFYEAR(date) | None | |
EXTRACT(extract-field FROM extract-source)#3 | None | None | None | |
HOUR(time) | None | None | None | |
MINUTE(time) | None | None | None | |
MONTH(time) | None | None | None | |
MONTHNAME(date) | None | MASTER.MONTHNAME(date) | None | |
NOW()#2 | CURRENT TIMESTAMP(6) 08-02 |
Same as at left | Same as at left | |
QUARTER(date) | None | MASTER.QUARTER(date) | None | |
SECOND(time) | None | None | None | |
TIMESTAMPADD(interval, count, timestamp)#3 | None | None | None | |
TIMESTAMPDIFF(interval, timestamp1, timestamp2)#3 | None | None | None | |
WEEK(date) | None | MASTER.WEEK(date) | None | |
YEAR(date) | None | None | None | |
System functions | DATABASE()#3 | None | None | None |
IFNULL(expression, value)#3 | None | None | None | |
USER()#4 | USER 08-02 |
Same as at left | Same as at left | |
Data type conversion function | CONVERT(value, SQLtype)#2, #4 | None | None | None |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.