Here is the XMLDOCOUMENT.
I want to return the "OfferCd" and "OfferSrcCd" only if "OfferTypeCd" = 'Y'.
So, I am trying to achieve this using XMLTABLE as mentioned below, but I am not able to see any result. I am not getting any error for the below code, but not getting the results back. The result-set is empty.
XMLTABLE( 'for $j in $D_PRFL/AccountOffer/offer where $j/OfferTypeCd=$CHNL_CD return $j/OfferCd' passing D.XML_TX as "D_PRFL", 'Y' as "CHNL_CD" COLUMNS OFF_CD VARCHAR(20) PATH '.' )AS P_OFFER
Could anybody let me know what is missing in the above code. Many thanks.