我正在从两个表创建一个树:
DOC_RLSE with column IWR_NO (num), IWR_Desc (char)
DOC_RLSE_DTL with column IWR_NO (num), ELM_NAME (char)
我已经提到了一个好的Apex应用程序,根据该应用程序代码是正确的: 但它仍然给我一个错误: 第11行,第5列:ORA-01790:表达式必须与相应的表达式具有相同的数据类型(可能只有一个原因,即数据类型错误或UNION中的顺序错误但不是这种情况 代码如下:
select case when connect_by_isleaf = 1 then 0
when level = 1 then 1
else -1
end as status,
level,
name as title,
null as icon,
id as value,
null as tooltip,
null as link
from (
SELECT IWR_NO as id,
null as parent,
IWR_DESC as name,
NULL,
NULL,
NULL
FROM DOC_RLSE
UNION ALL
SELECT ELM_NAME as id,
IWR_NO as parent,
ELM_NAME as name,
NULL,
NULL,
NULL
FROM DOC_RLSE_DTL
)
start with parent is null
connect by prior id = parent
order siblings by name;
我尝试过单表,但它正在运行。有人可以调查一下,让我知道是否有错误。
根据这个oracle apex应用程序没有错: https://apex.oracle.com/pls/apex/f?p=36648:13:109092209475531::::: 要登录此示例应用程序,请使用guest / apex_chart_demo 。
点击链接登录应用程序并查看工作树