1

我正在从两个表创建一棵树:

 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

单击链接以登录应用程序并查看工作树

4

0 回答 0