SQL functions and constants

Both Informix® and DB2® provide numerous built-in SQL functions. Most Informix SQL functions have the same name and purpose in DB2 ( DAY(), MONTH(), YEAR(), UPPER(), LOWER(), LENGTH() ).

Table 1. Informix and IBM® DB2 built-in SQL functions
Informix IBM DB2
today current date
current hour to second current time
current year to fraction(5) current timestamp
trim( [leading | trailing | both "char" FROM] "string") ltrim() and rtrim()
pow(x,y) power(x,y)

Solution

You must review the SQL statements using TODAY / CURRENT / EXTEND expressions.

You can create user defined functions ( UFs ) in the DB2 database.