DB2 Function/Special Register | SQL Server Equivalent | Is Function | Is Special Register |
---|---|---|---|
VARIANCE | VAR | Yes | |
IFNULL | COALESCE | Yes | |
VALUE | COALESCE | Yes | |
ASCII_CHR | CHAR | Yes | |
LCASE | LOWER | Yes | |
REPEAT | REPLICATE | Yes | |
SUBSTR | SUBSTRING | ||
UCASE | UPPER | Yes | |
LN | LOG | Yes | |
CURRENT CLIENT_APPLNAME | APP_NAME() | Yes | |
CURRENT CLIENT_USERID | SYSTEM_USER | Yes | |
CURRENT CLIENT_WRKSTNNAME | HOST_NAME() | Yes | |
CURRENT DATE | CONVERT(date,SYSDATETIME()) | Yes | |
CURRENT TIME | CONVERT(time(0), SYSDATETIME()) | Yes | |
CURRENT TIMESTAMP | CONVERT(datetime2(6), SYSDATETIME()) | Yes | |
CURRENT_DATE | CONVERT(date,SYSDATETIME()) | ||
CURRENT_TIME | CONVERT(time(0), SYSDATETIME()) | ||
CURRENT_TIMESTAMP | CONVERT(datetime2(6), SYSDATETIME()) | ||
CURRENT LC_CTYPE | CONVERT(char(50), SERVERPROPERTY('collation')) | Yes | |
CURRENT_LC_CTYPE | CONVERT(char(50), SERVERPROPERTY('collation')) | ||
CURRENT LOCALE LC_CTYPE | CONVERT(char(50), SERVERPROPERTY('collation')) | Yes | |
CURRENT SCHEMA | CONVERT(varchar(128), SCHEMA_NAME()) | Yes | |
CURRENT_SCHEMA | CONVERT(varchar(128), SCHEMA_NAME()) | ||
CURRENT SERVER | CONVERT(char(16), SERVERPROPERTY('servername')) | Yes | |
CURRENT SQLID | USER | Yes | |
SESSION_USER | USER | ||
TRAN | "TRAN" | ||
APPLICATION | "APPLICATION" | ||
ORDER | "ORDER" | ||
DIGITS | dbo.digits | Yes | |
LENGTH | DATALENGTH | Yes | |
LPAD | dbo.LPAD | Yes | |
RPAD | dbo.RPAD | Yes |