Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Execution of xquery with sql prompt(oracle 11g)

675301Dec 12 2008
Hi All I am executing the following query with squl prompt:

SELECT XMLQuery('xquery version "1.0"; (: :)
declare default element namespace "eNodeB"; (: :)
for $m in ora:tokenize('oracle~','~')
return ($m)'
RETURNING CONTENT) AS RESULT
FROM DUAL;

But its giving the following exception

for $m in ora:tokenize('deepa~','~')
*
ERROR at line 3:
ORA-19109: RETURNING keyword expected


2) With the below mentioned query

SELECT XMLQuery('xquery version "1.0"; (: :)
declare default element namespace "eNodeB"; (: :)
for $x in $eNodeBRef/eNodeBFile/eNodeB/eNodeBTop[eNodeBTopIndex='1']
for $m in ora:tokenize('eNodeBTopAttr1~','~')
let $r:=$x/following-sibling::*[local-name(.)=$m]
where (exists($x/*[local-name(.)=$m]) or exists($r))
return (
if(exists($r) and not(exists($x/*[local-name(.)=$m]))) then
element{local-name($r)}{data($r)} else(), if(exists($x/*[local-na
me(.)=$m])) then element{local-name($x/*[local-name(.)=$m])}{data($x/*[local-name(.)=$m])} else()' PASSING p.OBJECT_VALUE AS
"eNodeBRef"
RETURNING CONTENT) AS RESULT
FROM A_ENODEB p
WHERE
existsNode(p.OBJECT_VALUE,
'/eNodeBFile/fileHeader[@fileName="eNodeB_inst_1.xml"=1;


its giving the below error while executing through sql prompt



*for $x in $eNodeBRef/eNodeBFile/eNodeB/eNodeBTop[eNodeBTopIndex='1']
*
ERROR at line 3:
ORA-19109: RETURNING keyword expected*
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 9 2009
Added on Dec 12 2008
0 comments
231 views