Skip to Main Content

DevOps, CI/CD and Automation

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!

Xquery Error due to Upper/Lower Case

TrojanSpiritOct 31 2012 — edited Oct 31 2012
Hello,

When I am writing my Xquery like following, it works !

Select RW.*
from ULQUEUE UL, XMLTABLE('//Row' PASSING UL.TEXT
COLUMNS
*"EVENT" CHAR(10) PATH 'Event',*
*"REASONCODE" CHAR(10) PATH 'Reason_Code',*
*"DESCRIPTION" CHAR(10) PATH 'Description'*
*) AS RW*
where
*UL.ID = '[Param.1]' and*
*UL.QUEUENAME = '[Param.2]' and*
*RW.EVENT = '[Param.3]' and*
*RW.REASONCODE = '[Param.4]'*

But I need to have Headers same as XML Node. SO when I write following query, it does not work :

Select RW.*
from ULQUEUE UL, XMLTABLE('//Row' PASSING UL.TEXT
COLUMNS
*"Event" CHAR(10) PATH 'Event',*
*"Reason_Code" CHAR(10) PATH 'Reason_Code',*
*"Description" CHAR(10) PATH 'Description'*
*) AS RW*
where
*UL.ID = '[Param.1]' and*
*UL.QUEUENAME = '[Param.2]' and*
*RW.Event = '[Param.3]' and*
*RW.Reason_Code = '[Param.4]'*

It gives me this error: java.sql.SQLSyntaxErrorException: ORA-00904: "RW"."REASON_CODE": invalid identifier

If I remove RW.Reason_Code = '[Param.4]' from where clause, it gives me this error: java.sql.SQLSyntaxErrorException: ORA-00904: "RW"."EVENT": invalid identifier

So just want to know, why in UPPERCASE the query works but in camel or Lowercase it does not.

What should I do to make columnheaders same as XML Nodes?

Edited by: 967327 on Oct 30, 2012 11:33 PM
This post has been answered by odie_63 on Oct 31 2012
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 28 2012
Added on Oct 31 2012
2 comments
1,999 views