Library /sys$common/syshlp/SQL$HELP72.HLB  —  Built In Functions, SYS_GET_DIAGNOSTIC
    The SYS_GET_DIAGNOSTIC function returns the same session
    information available to the GET DIAGNOSTICS statement. This
    function provides a shorthand method of fetching values without
    requiring a compound statement, or an intermediate variable.

    Syntax: SYS_GET_DIAGNOSTIC ( statement-item-name ) ->

    For the list of keywords acceptable by this function please
    see the statement-item-name syntax under the GET DIAGNOSTICS
    statement.

    Each keyword used with SYS_GET_DIAGNOSTIC will cause the result
    to have a different associated data type. Please refer to the GET
    DIAGNOSTICS statement for the returned data types.

    The following example shows the return of session information.

    SQL> select SYS_GET_DIAGNOSTIC (CONNECTION_NAME) as CONN,
    cont>       SYS_GET_DIAGNOSTIC (SERVER_IDENTIFICATION) as IDENT,
    cont>       SYS_GET_DIAGNOSTIC (DATABASE_HANDLE) as DBHANDLE
    cont>  from GET_DIAG;
     CONN                              IDENT                             DBHANDLE
     RDB$DEFAULT_CONNECTION            Oracle Rdb V7.2-501                  1
    1 row selected
    SQL>
Close Help