Hi All,
I have a situation where I am trying to do a decode over an xmlelement but it doesn't seem to work. The requirement is for me to include either Debit(or) Credit xmltag and the corresponding amount based on the invoice type, is there any other way other than using decode that xmlelement would accept?
SELECT XMLCONCAT (
XMLELEMENT ("TrxNumber", 12345),
XMLELEMENT (DECODE ( :p_class, 'INV', "Debit", 'CM', "Credit"),
DECODE ( :p_class, 'INV', 123, 'CM', -123)
)
)
abc
FROM dual
We are on Oracle DB version 12.1.0.2.0
Appreciate any inputs
Thanks in advance!