This is my oracle SQL :
WITH q1(Tdata,paymentinterchangekey) AS
(
SELECT XMLtype(transportdata, 1), paymentinterchangekey
FROM bph_owner.paymentinterchange
WHERE paymentinterchangekey = '137630105'
)
SELECT EXTRACT(q1.Tdata, '/Document/CstmrCdtTrfInitn/GrpHdr/MsgId'),
q1.Tdata,
q1.paymentinterchangekey "EE",
q1.paymentinterchangekey "EE"
FROM q1;
and data is :
<?xml version="1.0" encoding="ISO-8859-1"?>
<Document xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" >
<CstmrCdtTrfInitn>
<GrpHdr>
<MsgId>SEPA21012022</MsgId>
<CreDtTm>2022-01-20T11:45:59.177</CreDtTm>
<NbOfTxs>12</NbOfTxs>
<CtrlSum>22277.57</CtrlSum>
<InitgPty>
<Nm>
Any idea why the EXTRACT value is empty?
EXTRACTis deprecated. UseXMLQUERYand declare the namespace:db<>fiddle here