No data when querying XML document which does not have all the elements that are populated

Hi people

Following the previous post http://bit.ly/beyCdc forum, I met a new show that I'm looking to solve today.

General information:

The xml document, I try to shred them may exist in 2 forms; b limited form and (b) complex form, which
to comply with the same xmlschema.

The structure of the two forms of the document is:

b limited version

(1) under the parent node (of BASANTA) is a child node - RTDRFileHeader
(2) also under the parent node is a node of complex "ConnectionList. This can consist of thousands of child nodes 'connection '.
(3) below a given node of "Connection" are child nodes that are of interest, they are:
      
      Connection/HPMN
      Connection/VPM
      Connection/FileItemList/FileItem/FileType/InitTAP/TAPSeqNo
      Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TAPTxCutoffTmstp
      Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TAPAvailTmstp
      Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TAPCurrency
      Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TotalNetCharge
      Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TotalTax
(b) extended version

The structure of the Extended version is identical to the above limited version but there are elements of additional group under the /chargeInfo. element
It's TrafficBreakdownList and AdditionalChargeInfo. In addition, the TrafficBreakdownList has child nodes that contain elements of the group.
For example.
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType/CallEventInfo/NumberOfEvents
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType/CallEventInfo/TotNetCharge
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/CallEventType/CallEventInfo/TotTaxValue
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/InvPeriod
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalNetChargeSDR
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalTaxSDR
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/VPMNLocCurr
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalNetChargeVLCSR
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalNetChargeVLCCD
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalTaxVLCCD
    Connection/FileItemList/FileItem/FileType/InitTAP/ChargeInfo/TrafficBreakdownList/TrafficBreakdownItem/AdditionalChargeInfo/TotalTaxVLCCD
What I'm trying to achieve, if possible, is to have a SQL statement that can interrogate the two versions of the xml document. Currently
the following SQL statement works properly against the extended version XML document, but when used against the limited version he returns no rows.

I guess what I'm after is like a LEFT JOIN XML :-) If the node is not present, returns NULL for this element.

b limited Version of XML
<RTDR>
  <RTDRFileHeader>
    <Prefix>MRTDR</Prefix>
    <Sender>EDSCH</Sender>
    <Recipient>NXTMP</Recipient>
    <PMN>UKRAS</PMN>
    <ReportSeqNo>5</ReportSeqNo>
    <TADIGGenSchemaVersion>2.2</TADIGGenSchemaVersion>
    <RTDRSchemaVersion>1.1</RTDRSchemaVersion>
    <CreationTmstp>2009-09-04T04:04:00.000000+02:00</CreationTmstp>
  </RTDRFileHeader>
<ConnectionList>
 <Connection>
      <VPMN>UKRAS</VPMN>
      <HPMN>LIEK9</HPMN>
      <FileItemList>
        <FileItem>
          <FileID>CDUKRASLIEK901274-00005-m</FileID>
          <ExchTmstp>2009-08-24T12:07:22.000000+02:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>1274</TAPSeqNo>
              <NotifFileInd>true</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2009-08-24T12:52:10.000000+03:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2009-08-24T11:52:10.000000+02:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>0</TotalNetCharge>
                <TotalTax>0</TotalTax>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
        <FileItem>
          <FileID>CDUKRASLIEK901280-00005-m</FileID>
          <ExchTmstp>2009-08-30T12:14:39.000000+02:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>1280</TAPSeqNo>
              <NotifFileInd>true</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2009-08-30T12:52:34.000000+03:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2009-08-30T11:52:34.000000+02:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>0</TotalNetCharge>
                <TotalTax>0</TotalTax>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
      </FileItemList>
    </Connection>
  <Connection>
      <VPMN>UKRZZ</VPMN>
      <HPMN>LIEZZ</HPMN>
      <FileItemList>
        <FileItem>
          <FileID>CDUKRZZLIEZZ01274-00005-m</FileID>
          <ExchTmstp>2009-08-24T12:07:22.000000+02:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>1274</TAPSeqNo>
              <NotifFileInd>true</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2009-08-24T12:52:10.000000+03:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2009-08-24T11:52:10.000000+02:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>0</TotalNetCharge>
                <TotalTax>0</TotalTax>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
        <FileItem>
          <FileID>CDUKRZZLIEZZ01280-00005-m</FileID>
          <ExchTmstp>2009-08-30T12:14:39.000000+02:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>1280</TAPSeqNo>
              <NotifFileInd>true</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2009-08-30T12:52:34.000000+03:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2009-08-30T11:52:34.000000+02:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>0</TotalNetCharge>
                <TotalTax>0</TotalTax>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
      </FileItemList>
    </Connection>
 </ConnectionList>
 </RTDR> '
(b) extended version of XML
<RTDR xmlns:tadig-gen="https://infocentre.gsm.org/TADIG-GEN" xmlns="https://infocentre.gsm.org/TADIG-RTDR">
  <RTDRFileHeader>
    <Prefix>DRTDR</Prefix>
    <Sender>EDSCH</Sender>
    <Recipient>NXTMP</Recipient>
    <PMN>AAAAA</PMN>
    <ReportSeqNo>1</ReportSeqNo>
    <TADIGGenSchemaVersion>2.2</TADIGGenSchemaVersion>
    <RTDRSchemaVersion>1.1</RTDRSchemaVersion>
    <CreationTmstp>2010-03-17T12:32:37.000000+01:00</CreationTmstp>
  </RTDRFileHeader>
  <ConnectionList>
    <Connection>
      <VPMN>AAAAA</VPMN>
      <HPMN>GRCCO</HPMN>
      <FileItemList>
        <FileItem>
          <FileID>CDAAAAAGRCCO04164-00001-d</FileID>
          <ExchTmstp>2010-03-16T00:30:27.000000+01:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>4164</TAPSeqNo>
              <NotifFileInd>false</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2010-03-16T00:15:25.000000+01:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2010-03-16T00:15:25.000000+01:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>48.546</TotalNetCharge>
                <TotalTax>0</TotalTax>
                <TrafficBreakdownList>
                  <TrafficBreakdownItem>
                    <CallEventType>CS MO</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>7</NumberOfEvents>
                      <TotNetCharge>11.16</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>CS MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>2</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>GPRS Calls</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>26</NumberOfEvents>
                      <TotNetCharge>37.35</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MO</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>1</NumberOfEvents>
                      <TotNetCharge>.036</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>3</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                </TrafficBreakdownList>
                <AdditionalChargeInfo>
                  <InvPeriod>2010-03</InvPeriod>
                  <TotalNetChargeSDR>48.546</TotalNetChargeSDR>
                  <TotalTaxSDR>0</TotalTaxSDR>
                  <VPMNLocCurr>EUR</VPMNLocCurr>
                  <TotalNetChargeVLCSR>54.687</TotalNetChargeVLCSR>
                  <TotalTaxVLCSR>0</TotalTaxVLCSR>
                  <TotalNetChargeVLCCD>54.216</TotalNetChargeVLCCD>
                  <TotalTaxVLCCD>0</TotalTaxVLCCD>
                </AdditionalChargeInfo>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
        <FileItem>
          <FileID>CDAAAAAGRCCO04165-00001-d</FileID>
          <ExchTmstp>2010-03-16T09:27:15.000000+01:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>4165</TAPSeqNo>
              <NotifFileInd>false</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2010-03-16T09:15:20.000000+01:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2010-03-16T09:15:20.000000+01:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>7.114</TotalNetCharge>
                <TotalTax>0</TotalTax>
                <TrafficBreakdownList>
                  <TrafficBreakdownItem>
                    <CallEventType>CS MO</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>5</NumberOfEvents>
                      <TotNetCharge>4.985</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>CS MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>1</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>GPRS Calls</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>10</NumberOfEvents>
                      <TotNetCharge>2.057</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MO</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>2</NumberOfEvents>
                      <TotNetCharge>.072</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>6</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                </TrafficBreakdownList>
                <AdditionalChargeInfo>
                  <InvPeriod>2010-03</InvPeriod>
                  <TotalNetChargeSDR>7.114</TotalNetChargeSDR>
                  <TotalTaxSDR>0</TotalTaxSDR>
                  <VPMNLocCurr>EUR</VPMNLocCurr>
                  <TotalNetChargeVLCSR>8.014</TotalNetChargeVLCSR>
                  <TotalTaxVLCSR>0</TotalTaxVLCSR>
                  <TotalNetChargeVLCCD>7.959</TotalNetChargeVLCCD>
                  <TotalTaxVLCCD>0</TotalTaxVLCCD>
                </AdditionalChargeInfo>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
        <FileItem>
          <FileID>CDAAAAAGRCCO04166-00001-d</FileID>
          <ExchTmstp>2010-03-16T14:28:43.000000+01:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>4166</TAPSeqNo>
              <NotifFileInd>false</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2010-03-16T14:15:23.000000+01:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2010-03-16T14:15:23.000000+01:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>1.638</TotalNetCharge>
                <TotalTax>0</TotalTax>
                <TrafficBreakdownList>
                  <TrafficBreakdownItem>
                    <CallEventType>CS MO</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>2</NumberOfEvents>
                      <TotNetCharge>1.458</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>CS MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>7</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MO</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>5</NumberOfEvents>
                      <TotNetCharge>.18</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>15</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                </TrafficBreakdownList>
                <AdditionalChargeInfo>
                  <InvPeriod>2010-03</InvPeriod>
                  <TotalNetChargeSDR>1.638</TotalNetChargeSDR>
                  <TotalTaxSDR>0</TotalTaxSDR>
                  <VPMNLocCurr>EUR</VPMNLocCurr>
                  <TotalNetChargeVLCSR>1.845</TotalNetChargeVLCSR>
                  <TotalTaxVLCSR>0</TotalTaxVLCSR>
                  <TotalNetChargeVLCCD>1.832</TotalNetChargeVLCCD>
                  <TotalTaxVLCCD>0</TotalTaxVLCCD>
                </AdditionalChargeInfo>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
      </FileItemList>
    </Connection>
    <Connection>
      <VPMN>AAAAA</VPMN>
      <HPMN>GRCSH</HPMN>
      <FileItemList>
        <FileItem>
          <FileID>CDAAAAAGRCSH03283-00001-d</FileID>
          <ExchTmstp>2010-03-16T00:30:29.000000+01:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>3283</TAPSeqNo>
              <NotifFileInd>false</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2010-03-16T00:15:25.000000+01:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2010-03-16T00:15:25.000000+01:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>0</TotalNetCharge>
                <TotalTax>0</TotalTax>
                <TrafficBreakdownList>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>1</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                </TrafficBreakdownList>
                <AdditionalChargeInfo>
                  <InvPeriod>2010-03</InvPeriod>
                  <TotalNetChargeSDR>0</TotalNetChargeSDR>
                  <TotalTaxSDR>0</TotalTaxSDR>
                  <VPMNLocCurr>EUR</VPMNLocCurr>
                  <TotalNetChargeVLCSR>0</TotalNetChargeVLCSR>
                  <TotalTaxVLCSR>0</TotalTaxVLCSR>
                  <TotalNetChargeVLCCD>0</TotalNetChargeVLCCD>
                  <TotalTaxVLCCD>0</TotalTaxVLCCD>
                </AdditionalChargeInfo>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
        <FileItem>
          <FileID>CDAAAAAGRCSH03284-00001-d</FileID>
          <ExchTmstp>2010-03-16T09:27:16.000000+01:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>3284</TAPSeqNo>
              <NotifFileInd>false</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2010-03-16T09:15:20.000000+01:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2010-03-16T09:15:20.000000+01:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>.072</TotalNetCharge>
                <TotalTax>0</TotalTax>
                <TrafficBreakdownList>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MO</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>2</NumberOfEvents>
                      <TotNetCharge>.072</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>2</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                </TrafficBreakdownList>
                <AdditionalChargeInfo>
                  <InvPeriod>2010-03</InvPeriod>
                  <TotalNetChargeSDR>.072</TotalNetChargeSDR>
                  <TotalTaxSDR>0</TotalTaxSDR>
                  <VPMNLocCurr>EUR</VPMNLocCurr>
                  <TotalNetChargeVLCSR>.081</TotalNetChargeVLCSR>
                  <TotalTaxVLCSR>0</TotalTaxVLCSR>
                  <TotalNetChargeVLCCD>.081</TotalNetChargeVLCCD>
                  <TotalTaxVLCCD>0</TotalTaxVLCCD>
                </AdditionalChargeInfo>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
        <FileItem>
          <FileID>CDAAAAAGRCSH03285-00001-d</FileID>
          <ExchTmstp>2010-03-16T14:28:45.000000+01:00</ExchTmstp>
          <FileType>
            <InitTAP>
              <TAPSeqNo>3285</TAPSeqNo>
              <NotifFileInd>false</NotifFileInd>
              <ChargeInfo>
                <TAPTxCutoffTmstp>2010-03-16T14:15:24.000000+01:00</TAPTxCutoffTmstp>
                <TAPAvailTmstp>2010-03-16T14:15:24.000000+01:00</TAPAvailTmstp>
                <TAPCurrency>SDR</TAPCurrency>
                <TotalNetCharge>0</TotalNetCharge>
                <TotalTax>0</TotalTax>
                <TrafficBreakdownList>
                  <TrafficBreakdownItem>
                    <CallEventType>SM-MT</CallEventType>
                    <CallEventInfo>
                      <NumberOfEvents>1</NumberOfEvents>
                      <TotNetCharge>0</TotNetCharge>
                      <TotTaxValue>0</TotTaxValue>
                    </CallEventInfo>
                  </TrafficBreakdownItem>
                </TrafficBreakdownList>
                <AdditionalChargeInfo>
                  <InvPeriod>2010-03</InvPeriod>
                  <TotalNetChargeSDR>0</TotalNetChargeSDR>
                  <TotalTaxSDR>0</TotalTaxSDR>
                  <VPMNLocCurr>EUR</VPMNLocCurr>
                  <TotalNetChargeVLCSR>0</TotalNetChargeVLCSR>
                  <TotalTaxVLCSR>0</TotalTaxVLCSR>
                  <TotalNetChargeVLCCD>0</TotalNetChargeVLCCD>
                  <TotalTaxVLCCD>0</TotalTaxVLCCD>
                </AdditionalChargeInfo>
              </ChargeInfo>
            </InitTAP>
          </FileType>
        </FileItem>
      </FileItemList>
    </Connection>
  </ConnectionList>
</RTDR>’
It's the query I want to be able to run against the two XML documents. As mentioned, this works very well against the complex XML but no result against the simple XML.
SELECT
         rtd.rtdr_document_id
        ,rtd.filename
        ,EXTRACTVALUE(rtd.rtdr , '/RTDR/RTDRFileHeader/PMN' )                                      client_pmn
        ,connXML."VPMN"                                                                            vpmn
        ,connXML."HPMN"                                                                            hpmn
        ,fileXML."TAPSeqNo"                                                                        tap_seq_no
        ,chrgXML."TAPTxCutoffTmstp"                                                                tap_tx_cut_off_tmstp
        ,chrgXML."TAPAvailTmstp"                                                                   tap_avail_tmstp
        ,chrgXML."TAPCurrency"                                                                     tap_currency
        ,chrgXML."TotalNetCharge"                                                                  total_net_charge
        ,chrgXML."TotalTax"                                                                        total_tax
        ,traffXML."CallEventType"                                                                  call_event_type     
        ,callEvtXML."NumberOfEvents"                                                               number_of_events
        ,callEvtXML."TotNetCharge"                                                                 call_event_ttl_net_charge
        ,callEvtXML."TotTaxValue"                                                                  call_event_ttl_tax_value
FROM     t   rtd
        ,XMLTABLE(
                  XMLNAMESPACES
                  (
                    DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                  ),
                  '/RTDR/ConnectionList/Connection'
                  PASSING  rtd.myXML
                  COLUMNS
                  "VPMN"       VARCHAR2(5)    PATH '/Connection/VPMN'
                 ,"HPMN"       VARCHAR2(5)    PATH '/Connection/HPMN'
                 ,"FileXML"    XMLTYPE        PATH '/Connection/FileItemList/FileItem/FileType/InitTAP'
                 )  connXML
       ,XMLTABLE(
                  XMLNAMESPACES
                  (
                    DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                  ),
                  '/InitTAP'
                  PASSING  connXML."FileXML"
                  COLUMNS
                  "TAPSeqNo"       VARCHAR2(50)   PATH '/InitTAP/TAPSeqNo'
                 ,"ChargeInfoXML"  XMLTYPE        PATH '/InitTAP/ChargeInfo'
                )  fileXML
       ,XMLTABLE(
                  XMLNAMESPACES
                  (
                    DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                  ),
                 '/ChargeInfo'
                  PASSING  fileXML."ChargeInfoXML"
                  COLUMNS
                  "TAPTxCutoffTmstp"          VARCHAR2(30)     PATH '/ChargeInfo/TAPTxCutoffTmstp'
                 ,"TAPAvailTmstp"             VARCHAR2(30)     PATH '/ChargeInfo/TAPAvailTmstp'
                 ,"TAPCurrency"               VARCHAR2(30)     PATH '/ChargeInfo/TAPCurrency'
                 ,"TotalNetCharge"            NUMBER(22,5)     PATH '/ChargeInfo/TotalNetCharge'
                 ,"TotalTax"                  NUMBER(22,5)     PATH '/ChargeInfo/TotalTax'
                 ,"TrafficBreakdownListXML"   XMLTYPE          PATH 'TrafficBreakdownList/TrafficBreakdownItem'
                )  chrgXML
       ,XMLTABLE(
                  XMLNAMESPACES
                  (
                    DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                  ),
                 '/TrafficBreakdownItem'
                  PASSING  chrgXML."TrafficBreakdownListXML"
                  COLUMNS
                  "CallEventType"             VARCHAR2(20)     PATH '/TrafficBreakdownItem/CallEventType'
                 ,"CallEventInfoXML"          XMLTYPE          PATH '/TrafficBreakdownItem/CallEventInfo'
                )  traffXML
       ,XMLTABLE(
                  XMLNAMESPACES
                  (
                    DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                  ),
                 '/CallEventInfo'
                  PASSING  traffXML."CallEventInfoXML" 
                  COLUMNS
                  "NumberOfEvents"            NUMBER           PATH '/CallEventInfo/NumberOfEvents'
                 ,"TotNetCharge"              NUMBER           PATH '/CallEventInfo/TotNetCharge'
                 ,"TotTaxValue"               NUMBER           PATH '/CallEventInfo/TotTaxValue'
                )   callEvtXML
Thank you very much

Kind regards

Simon Gadd

Hi Simon,.

I guess what I'm after looks like a LEFT JOIN XML

Exactly.

Try to add a (+) after the last two XMLTABLEs operator:

...
       ,XMLTABLE(
                  XMLNAMESPACES
                  (
                    DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                  ),
                 '/TrafficBreakdownItem'
                  PASSING  chrgXML."TrafficBreakdownListXML"
                  COLUMNS
                  "CallEventType"             VARCHAR2(20)     PATH '/TrafficBreakdownItem/CallEventType'
                 ,"CallEventInfoXML"          XMLTYPE          PATH '/TrafficBreakdownItem/CallEventInfo'
                ) (+)  traffXML
       ,XMLTABLE(
                  XMLNAMESPACES
                  (
                    DEFAULT 'https://infocentre.gsm.org/TADIG-RTDR'
                  ),
                 '/CallEventInfo'
                  PASSING  traffXML."CallEventInfoXML"
                  COLUMNS
                  "NumberOfEvents"            NUMBER           PATH '/CallEventInfo/NumberOfEvents'
                 ,"TotNetCharge"              NUMBER           PATH '/CallEventInfo/TotNetCharge'
                 ,"TotTaxValue"               NUMBER           PATH '/CallEventInfo/TotTaxValue'
                ) (+)  callEvtXML

HTH.

PS: the declaration of namespaces does not appear in the 'limited' version, perhaps you simply forgotten in your sample? Could you confirm?

Tags: Database

Similar Questions

  • My DVD will play. My DVD says disc is bad or needs to be formatted when I try to burn. Backup stops and says back up does not have all the

    I want to backup my computer to an external hard drive but the popup of backup does not have this option.

    Hi Janice,.

    (a) have you tried using different DVD to burn backup files and check if it burns?

    (b) your use of any third-party burning software on the computer?

    (c) what is the size of the backup files that you try to burn on DVD?

    (d) you are able to burn CD/DVD in Windows Explorer?

    (e) you are able to perform the backup to internal hard drive? You cannot save to the C: drive, try to perform the backup on a different partition and check.

    Try to uninstall the burning of third-party of the computer software and check. Also try using different DVD to back up files. I suggest you follow these methods and see if it helps:

    Method 1: run this Microsoft fixit tool:

    http://support.Microsoft.com/mats/cd_dvd_drive_problems

    Method 2:

    Navigate to the following location and delete all the files and then try to burn the DVD and check if it helps:

    C:\Users\(User Name) \AppData\Local\Microsoft\Windows\Burn\Temporary file Burn

    You can see this Microsoft article and check if it helps:

    http://Windows.Microsoft.com/en-in/Windows-Vista/change-where-you-back-up-your-files

    http://Windows.Microsoft.com/en-in/Windows-Vista/back-up-and-restore-frequently-asked-questions

    http://Windows.Microsoft.com/en-in/Windows-Vista/which-CD-or-DVD-format-should-i-use

    Hope this helps, if you need help on Windows or the problem persists, please let us know we will be happy to help you.

  • Document windows does not use all the available on new monitor display area

    Hello

    I have a new monitor - a Benq BL2711.

    I have set up as my secondary monitor on display in Windows 8.

    I can put Photoshop (CS6) on this screen and maximize the it, but there is a vast space not used in the document window, which is not used. I want to show a lot more of my images that I can currently, but the document window will not only fill all that screen real estate. A large part of it is lost.

    The panels occupy the right space to the bottom of the screen, but the window of the document (or the display area?) uses only 60% of the height of the screen.

    What is a limitation or do I have to configure something? (I have reset the workspace of photography).

    Thanks for any help

    Nick

    It is really a shot in the water, but it's the space used by the "timeline" Panel when it is open. Try to check in the menu window and close the bottle.

    Other that that, there are always some good old Reset preferences. Make sure you save the custom actions/brushes/presets and so forth first!

  • SQL query to a / columns of values for all the rows that are returned by default

    Hello everyone.
    I was looking for help to make an SQL query that can be achieved if all goes well-

    I want that all the rank values in a particular column of a set of rows returned by default for a specified string. For example, consider the SQL below:

    Select date, start_time, building and room
    of star.events

    Consider this example output of the query above-

    Start_time date room
    2009-07-01 9: 00 AB 99
    2009-02-03 7:11 ED
    2009-01-03 8:23 FF
    2009-03-04 4 am SD 29

    How can I change my statement default SQL column space to say ' 57 "regardless of what the actual database values are showing this instead?

    Start_time date room
    01/07/2009 9:57 AB
    2009-02-03 7:57 ED
    03/01/2009 8:57 FF
    2009-03-04 4 am JJ 57

    Any direction/suggestions would be much appreciated.
    Thank you!

    Hello

    SELECT DATE,
           start_time,
           building,
           57 as room
    FROM   star.events;
    

    Kind regards

  • Adobe first Clip does not see all the pictures/videos are stored internally

    How can I get Adobe first Clip to see all the pictures/videos that I know are stored in the internal memory of my iPhone?

    Hi tech-comm-Archbishop there!

    Are some of your photos/videos stored in the cloud? For the moment, Premiere Clip does not support storage cloud and all tracks audio/videos/images must be saved locally on your device. Let me know if this fits your situation.

    See you soon!

    -Kathleen

  • Matshita DVD-ROM UJ-850 s ATA does not have all the drivers are up-to-date

    Title of the Moose: Matshita DVD-ROM UJ-850 s ATA

    I can run no longer THAN CD/ROM s on my Toshiba laptop because I don't have the driver for it and I have no idea how he return to WG.

    Hello

    ·         What exactly happens when you try to play a CD/DVD?

    ·         You receive an error message during playback of the CD/DVD?

    I suggest you run the fix it provided in the link below to fix the problem.

    Your CD or DVD drive cannot read or write media

    http://support.Microsoft.com/mats/cd_dvd_drive_problems/

    You can also follow the manual for troubleshooting steps described in the link below and check if they help to resolve the issue.

    Your CD or DVD drive is missing or is not recognized by Windows or other programs

    http://support.Microsoft.com/kb/982116

  • I have a dell latitude 610 laptop that I had to wipe the hard drive and reinstall windows xp pro and it does not have all the internet apps

    When I reinstalled win xp pro it didn't install any help net drivers that I can't get on internet

    If you cannot access to the use of the internet, another computer and save the driver on a CD/DVD/card reader.

    Download network drivers for Internet

    Visit the manufacturer's Web site and select your model (this is usually done in the Support section). You should be able to download drivers for your model if they have drivers for your version of Windows. Download the driver and then follow the instructions to install.

    Reference Dell Driver Downloads:

    http://www.Dell.com/support/drivers

  • When are you going to create a captcha which does not have international bc

    When are you going to create a captcha which does not have international bc

    Hello

    With Adobe Muse CC 20141, reCaptcha and checkbox field can be added to forms.

    Please install our latest update to try out these new features.

    Release notes | Adobe Muse CC

    Thank you

    Sanjit

  • Cannot open my encrypted Documents? -Cannot open the document: user does not have access privileges

    I am using Window7 and I got some of my encrypted files by opening the properties of the file and selecting the encryption option. I have not had any problems so far, but all of a sudden I can't open my encrypted files. There is an error message indicating "cannot open the document: user does not have access privileges. But I have no other user account on my computer and I am logged in with my administrator profile. I turned off my computer, rebooted and tried various methods, but when I open the file it shows the same message as above. Help, please?

    Hello

    Please follow the steps from the link below.

    Appropriating a file or a folder

    http://TechNet.Microsoft.com/en-us/library/cc753659.aspx

    Also check out the links below.

    Encrypt or decrypt a file or folder

    http://Windows.Microsoft.com/en-us/Windows7/encrypt-or-decrypt-a-folder-or-file

    Recover encrypted files or folders

    http://Windows.Microsoft.com/en-us/Windows7/recover-encrypted-files-or-folders

    Import or export certificates and private keys

    http://Windows.Microsoft.com/en-us/Windows7/import-or-export-certificates-and-private-keys

  • Travel regions of Australia to New Zealand, which does not have the licenses for TV shows, will be my TV shows that I bought in Australia removed once I have change of regions in New Zealand?

    Travel regions of Australia to New Zealand, which does not have the licenses for TV shows, will be my TV shows that I bought in Australia removed once I have change of regions in New Zealand?

    N ° save them anyway.

    (138403)

  • My screen saver does not work all the time, usually this seems to happen once the aircraft stopped in the energy saving mode.

    Original title: my screensaver does not work all the time

    My screen saver does not work all the time.  First time I have turn on computer, it works OK.  Later in the day, this isn't.  Usually, this seems to happen once the aircraft stopped in the energy saving mode.  After the reactivation of the computer (do not), the screen saver does not work when it should. How to run all the time?  I am running Kapersky Internet Security 2011.  This would be closed by the screen saver?
    Thanks, Garybuyit

    Hi garybuyit,

    Thanks for posting your question in the Microsoft answers Forums.

    Just so I'm clear, updated you the graphics cards in Device Manager? You have access to a Windows XP installation disc. If so, follow the steps in this document to make a scan of the SFC. This analysis will attempt to repair or replace any missing or corrupted system files.

  • I have iphone5s and my contact id does not work, all the time he show faild Setup touch id please help?

    I have iphone5s and my contact id does not work, all the time he show faild Setup touch id please help?

    Hi yjain51,

    I understand you had some problems recently with getting Touch ID to work reliably on your iPhone 5s. I know that it is a feature of great security for your iPhone, so I'm happy to help you.

    When you use Touch ID, make sure that your hands are free of any dirt or moisture so that fingerprints can be read clearly. This article explains further:

    Use the ID Touch on iPhone and iPad - Apple Support

    Thank you for using communities Support from Apple. See you soon!

  • Send an email using mail my signature seems to drop before my email is considered by my beneficiaries. This does not happen all the time but often. Is anyone else know / encountered this problem? If, kind of help to rectify this please.

    Hi, when you send an email using the mail my signature seems to drop before my email is considered by my beneficiaries. This does not happen all the time but often. Is anyone else know / encountered this problem? If so help to rectify this would be greatly appreciated please. Thank you

    It is up to the recipient how their e-mail is displayed. For example, if you include html or an image in your email the recipient may set up their customer e-mail to not display html or images. You have no control over the way a recipient chooses configure their e-mail client.

  • Computer is very slow and IE does not work all the time.

    I bought a computer from my old employeer.  He is doing all sorts of things, or should I say not to do all sorts of things.  It is very slow and IE does not work all the time.  They have questions arise and ask if the administrator oks things and other things like that.  It came with any disks.  I would like to wipe, clean and load a new disc, but I don't know where to find the disc or if I can do it.   Can someone please?

    Hello

    Proceed as follows to contribute to these two questions. You can probably buy the disks of Vista machine to system or get
    the former employer to do it for you if necessary.

    Try these and it can also be a good idea to update your main drivers later. The General corruption can also play a
    role in this issue. And even the TCP/IP stack might need to be refreshed.

    What antivirus/antispyware/security products do you have on the machine? Be one you ALREADY had on this
    machine, including those you have uninstalled (they leave leftovers behind which can cause strange problems).

    If no joy there's something blocking perhaps.

    Start - All Programs - Accessories - System Tools - IE with no Addons - what works best?

    IE - Tools - Internet Options - Advanced - tab click on restore, and then click Reset - apply / OK

    IE - Tools - Internet Options - Security tab - click on reset all default areas - apply / OK

    Close and restart IE or IE with no addons

    not better?

    IE - tools - manage Addons (for sure disable SSV2 if it is there, it is no longer necessary but Java always install
    "(and it causes problems - you never update Java to go back in and turn it off again)." Search for other possible problems.

    Windows Defender - tools - software explore - look for problems with programs that do not look right. Permit
    are usually OK and "unauthorized" are not always bad. If in doubt about a program to ask about it here.

    Could be that a BHO - BHOremover - free - standalone program, needs no installation, download and run - not all
    are bad, but some can cause your question (toolbars are BHO).
    http://securityxploded.com/bhoremover.php

    Startup programs
    http://www.Vistax64.com/tutorials/79612-startup-programs-enable-disable.html

    Also get Malwarebytes - free - use as scanner only.

    http://www.Malwarebytes.org/

    --------------------------------

    Try these to erase corruption and missing/damaged file system repair or replacement.

    Run DiskCleanup - start - all programs - Accessories - System Tools - Disk Cleanup

    Start - type in the search box - find command top - RIGHT CLICK – RUN AS ADMIN

    sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program
    generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    Then, run checkdisk - schedule it to run at next boot, then apply OK your way out, then restart.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    --------------------

    Departure - in the search box, type-> order

    at the top of the list to find COMMAND - CLICK RIGHT to it - RUN AS ADMIN

    Type the following commands (or copy and paste one at a time), each followed by pressing on enter.

    ipconfig/flushdns

    nbtstat-r

    nbtstat - RR

    netsh int Reinitialis

    netsh int ip reset

    netsh winsock reset

    RESET

    That resets your TCP/IP stack

    --------------------------------

    Maybe need of these:

    For drivers, visit manufacturer of emergency system and of the manufacturer of the device that are the most common.
    Control Panel - Device Manager - Display Adapter - note the brand and complete model of your
    video card - double - tab of the driver - write version information. Now click on UPdate Driver (this
    cannot do anything as MS is far behind the certification of drivers) - then do a right click - Uninstall - REBOOT
    This will refresh the driver stack.

    Repeat this for network - card (NIC), Wifi network, sound, mouse, and keyboard if 3rd party with their
    own the software and drivers and all other main drivers that you have.

    Now go to the site of the manufacturer of system (Dell, HP, Toshiba as examples) (restoration) and then of the manufacturer of the device
    (Realtek, Intel, Nvidia, ATI, for example) and get their latest versions. (Look for the BIOS, Chipset and software)
    updates on the site of the manufacturer of the system here.)

    Download - SAVE - go to where you put them - right click - RUN AD ADMIN - REBOOT after each installation.

    Repeat to the manufacturers - BTW on device at the DO NOT RUN THEIR SCANNER - manually check by model.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    If you update the drivers manually, then it's a good idea to disable the facilities of driver in the Windows updates,
    This leaves ONE of Windows updates, but it will not install the drivers who are generally older and cause
    questions. If updates offers a new driver and then hide it (right click on it) and then go look for new ones
    manually if you wish.

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    Hope these helps.

    Rob - bicycle - Mark Twain said it is good.

  • Photoshop does not open all the files on my Imac it will open work and recent files very well but will not save. I have the latest version. What is "cleanmymac3" that prevents the loading of files?

    Photoshop does not open all the files on my Imac it will open work and recent files very well but will not save. I have the latest version. What is "cleanmymac3" that prevents the loading of files?

    I must add that when I try and open a file, it freezes and I have to force photoshop completely.

    Try resetting your Photoshop preferences.

Maybe you are looking for

  • Development system LabVIEW 2011 fails to install

    I just tried several times to install my new copy of LabVIEW 2011 Suite of Dev, but get an unknown exception (with no details - see photo) from the beginning of the installation of the development system (32-bit English).  I restarted and closed all

  • Could not initialize and I need to recover the data on the hard drive.

    Original title: computer MOM will not start and I need to recover the data on the hard drive. It's an old computer and I do not know what version of Windows it was running.  I guess I need a bootdisk of exploitation, but where can I download that?  O

  • My computer has a very slow start up. How can I fix it?

    I had my computer HP Desktop for 4 years, and in the past months, my computer is slow when starting. It is the Windows Logo screen for a few minutes, then a black screen for a few minutes before cranking up my office. It works fine the rest of the ti

  • Downgrade to XP corrupted / what C Final?

    Hello I just bought a nice R61 Notebook. After installing the system, I wanted to directly switch to XP. So I got the laptop using the rescue and recovery CD. Everything that was working OK until he wanted me to take the rescue and the recoveryCD and

  • Is it possible to create a combination of work Flexfield affectedly update API

    HelloWhen updating an assignment of people with an API using e.g.hr_assignment_api.update_emp_asghr_assignment_api.update_emp_asg_criteriahr_assignment_api.update_cwk_asghr_assignment_api.update_cwk_asg_criteriaetc.Is it possible to create a job Flex