OWB wb_rt_constants 定义
OWB wb_rt_constants definition
我正在尝试理解 SQL 的一部分,但不幸的是我无法执行。我卡在代码的一部分
wb_rt_constants.to_string (e.audit_status) AS audit_status_symbol
我似乎找不到 wb_rt_constants.to_string 的作用?是某种解码吗?有人可以解释一下
wb_rt_constants.to_string
正在尝试做,最好定义 wb_rt_constants.to_string 将受到高度赞赏?
不幸的是包体OWBSYS.wb_rt_constants
被包裹了所以我们看不到它的实现源代码。
无论如何,函数 to_string
具有以下签名:
function to_string(p_constant in number) return varchar2;
它用于某些 OWBSYS 视图,例如 ALL_RT_AUDIT_EXECUTIONS
,并且似乎将数字 ID 转换为描述性字符串,例如
col execution_audit_status format a20
select distinct e.audit_status,
wb_rt_constants.to_string(e.audit_status) as execution_audit_status
from wb_rt_audit_executions e;
AUDIT_STATUS EXECUTION_AUDIT_STAT
------------ --------------------
16002 BUSY
16004 COMPLETE
这些数字似乎与同一包的这些函数的输出匹配:
select wb_rt_constants.EXECUTION_STATUS_INACTIVE,
wb_rt_constants.EXECUTION_STATUS_BUSY,
wb_rt_constants.EXECUTION_STATUS_READY,
wb_rt_constants.EXECUTION_STATUS_COMPLETE
from dual;
EXECUTION_STATUS_INACTIVE EXECUTION_STATUS_BUSY EXECUTION_STATUS_READY EXECUTION_STATUS_COMPLETE
------------------------- --------------------- ---------------------- -------------------------
16001 16002 16003 16004
我正在尝试理解 SQL 的一部分,但不幸的是我无法执行。我卡在代码的一部分
wb_rt_constants.to_string (e.audit_status) AS audit_status_symbol
我似乎找不到 wb_rt_constants.to_string 的作用?是某种解码吗?有人可以解释一下
wb_rt_constants.to_string
正在尝试做,最好定义 wb_rt_constants.to_string 将受到高度赞赏?
不幸的是包体OWBSYS.wb_rt_constants
被包裹了所以我们看不到它的实现源代码。
无论如何,函数 to_string
具有以下签名:
function to_string(p_constant in number) return varchar2;
它用于某些 OWBSYS 视图,例如 ALL_RT_AUDIT_EXECUTIONS
,并且似乎将数字 ID 转换为描述性字符串,例如
col execution_audit_status format a20
select distinct e.audit_status,
wb_rt_constants.to_string(e.audit_status) as execution_audit_status
from wb_rt_audit_executions e;
AUDIT_STATUS EXECUTION_AUDIT_STAT
------------ --------------------
16002 BUSY
16004 COMPLETE
这些数字似乎与同一包的这些函数的输出匹配:
select wb_rt_constants.EXECUTION_STATUS_INACTIVE,
wb_rt_constants.EXECUTION_STATUS_BUSY,
wb_rt_constants.EXECUTION_STATUS_READY,
wb_rt_constants.EXECUTION_STATUS_COMPLETE
from dual;
EXECUTION_STATUS_INACTIVE EXECUTION_STATUS_BUSY EXECUTION_STATUS_READY EXECUTION_STATUS_COMPLETE
------------------------- --------------------- ---------------------- -------------------------
16001 16002 16003 16004