This content has been marked as final. Show 2 replies
The error has nothing to do with XQuery or XML.
In Oracle, identifiers are case-insensitive unless they are "quoted".
If you decide to use quoted identifiers, then you have to use them like this all the way down :
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]' ;
What should I do to make columnheaders same as XML Nodes?You cannot, the SQL projection has to be known at parse time, in other words column names must be hardcoded in the query.
Thanks a lot.
Yes, writing a query with
*and rw."Event" = '[Param.3]'*
*and rw."Reason_Code" = '[Param.4]'*
does solve my problem.