Previous Topic Next topic Print topic


Default Special Register Mappings

The default mappings HCOSS uses to convert DB2 special registers to SQL Server equivalents.

Note: In addition to these default mappings, you can also define customized mappings. See Customizing Functions and Special Registers for more information.

The following table shows supported DB2 special registers and their HCOSS default SQL Server equivalents.

DB2 Special Register SQL Server Equivalent
CURRENT CLIENT_APPLNAME APP_NAME()
CURRENT CLIENT_USERID SYSTEM_USER
CURRENT CLIENT_WRKSTNNAME HOST_NAME()
CURRENT DATE or CURRENT_DATE CONVERT(date,SYSDATETIME())
CURRENT TIME or CURRENT_TIME CONVERT(time(0), SYSDATETIME())
CURRENT TIMESTAMP or CURRENT_TIMESTAMP CONVERT(datetime2(6), SYSDATETIME())
CURRENT LC_CTYPE or CURRENT_LC_TYPE CONVERT(char(50), SERVERPROPERTY('collation'))
CURRENT LOCALE LC_CTYPE CONVERT(char(50), SERVERPROPERTY('collation'))
CURRENT SCHEMA or CURRENT_SCHEMA CONVERT(varchar(128), SCHEMA_NAME())
CURRENT SERVER CONVERT(char(16), SERVERPROPERTY('servername'))
CURRENT SQLID USER
SESSION_USER USER
Previous Topic Next topic Print topic