2

I am trying to create an array in XPath query using oracle, but it is treating as a string, below is the code snippet, can someone please help me where I am doing wrong.

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.
GMB
  • 188,822
  • 23
  • 52
  • 100
Saritha
  • 79
  • 7

0 Answers0