SoFunction
Updated on 2025-04-14

IBM DB2 Daily Maintenance Summary (9)

The db2 tutorial we are watching is: IBM DB2 daily maintenance summary (9). (EXP1,EXP2)
Returns the string after EXP1 is repeated EXP2 times.
SELECTCHAR(REPEAT('REPEAT',3),21)FROMBSEMPMS;

()
Returns a single-precision floating point representation of a numeric value.
SELECTREAL(10)FROMBSEMPMS;

()
Returns a random floating point number between 0 and 1.
SELECTRAND()FROMBSEMPMS;

(EXP1,EXP2)
Returns the EXP2 power of EXP1.
SELECTPOWER(2,5)FROMBSEMPMS;

(EXP1,EXP2)
Returns the position of EXP2 in EXP1.
SELECT('ABCDEFGH','D')FROMBSEMPMS;

(EXP1,EXP2)
If EXP1=EXP2, it is NULL, otherwise it is EXP1

()
Returns the partition number of the row.
SELECTNODENUMBER(EMP_NO)FROMBSEMPMS;

()
Returns the month part of a value.
SELECTMONTH('2003/10/20')FROMBSEMPMS;

(EXP1,EXP2)
Returns the remainder of EXP1 divided by EXP2.
SELECTMOD(20,8)FROMBSEMPMS;

()
Returns the minute part of a numeric value.
SELECTMINUTE('18:34:23')FROMBSEMPMS;

()
Delete the spaces in front of the string.
SELECTLTRIM('CDDD')FROMBSEMPMS;

()
Returns the hour part of a numeric value.
SELECTHOUR('18:34:23')FROMBSEMPMS;

()
If the parameter is a numeric expression, it returns the corresponding floating point number. If the parameter is a string expression, it returns the string expression of the number.
SELECTDOUBLE('5678')FROMBSEMPMS;

()
Returns the exponential function of the parameter.
SELECTEXP(2)FROMBSEMPMS;

()
Returns a floating point representation of a number.
SELECTFLOAT(789)FROMBSEMPMS;

()
Returns the maximum integer less than or equal to the parameter.
SLECTFLOOR(88.93)FROMBSEMPMS;

()
Returns a hexadecimal representation of the value represented as a string.
SELECTHEX(16)FROMBSEMPMS;