Skip to Main Content

SQL & PL/SQL

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!

SQL query with an XMLTYPEcolumn in condition

MoonlightJun 8 2022

Hi,
I don't have a good skills on XMLTYPE in oracle, Please I need your help to resolve this problem:
I have xmltype colonne :
<?xml version="1.0" encoding="UTF-8"?>
<invoice>
<invoicenumb>XXXXX</invoicenumb>
</invoice>
I would like to extract data when the xmltype column tag (invoicenumb) like 'VAR%'
I develop this query but there is un error:
select * from my table where xmltype(t.XML_COLONNE).extract('//invoicenumb/text()').getStringVal() like 'VAR%';

ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'

This post has been answered by mathguy on Jun 8 2022
Jump to Answer
Comments
Post Details
Added on Jun 8 2022
3 comments
281 views