SQL — System Functions

The table below lists the system functions included in the ODBC scalar function. Returned values are as ODBC data types.

Function

Description

BBJ_BUILD_DATE()

   or BBJ_BUILD_DATE

Returns the build date for BBjServices.

BBJ_BUILD_ID()

   or BBJ_BUILD_ID

Returns the build ID for BBjServices.

BBJ_REVISION()

   or BBJ_REVISION

Returns the revision information for BBjServices.

DATABASE()

   or DATABASE

Returns the name of the database corresponding to the connection handle (i.e., hdbc). The database name is also available by calling SQLGetConnectOption with SQL_CURRENT _QUALIFIER connection option.

USER()

   or USER

Returns the users authorization name. The users authorization name is also available by SQLGetInfo by the information type: SQL_USER_NAME.

Examples

select database(), user()

select database, user, bbj_build_date(), bbj_build_id(), bbj_revision()