2

我正在尝试使用 oracle 在 XPath 查询中创建一个数组,但它被视为一个字符串,下面是代码片段,有人可以帮我解决我做错的地方。

XMLQUERY('    
let $vals :=
    if (count($Cntnt/emp/emp_content/emp_part)=1) then 
      ("1") 
    else if (count($Cntnt/emp/emp_content/emp_part)=2) then 
      ("00","01","10","11")
    else if (count($Cntnt/emp/emp_content/emp_part)==3) then
      ("111","110","101","100","011","010","001","000")
    else()

      for $val in $vals
        return concat ($val,"")
      ' 
PASSING emp_xml AS "Cntnt" RETURNING CONTENT).getStringVal() as tst.
4

0 回答 0