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

Tags: Database

Similar Questions

  • query: find all the rows that are not separate

    Hi first of all I am not dba nor have much experience of fancy requests so be gentle

    Im trying to find all the lines that have a non-distincte value in column "C".
    Therefore, if the values in the column 'C' where:
    4
    54
    33
    4
    1
    9
    9

    the query returns 4 and 9

    I made this request:

    Select t.c
    table t
    where 1 <)
    Select count (c)
    table
    where c = t.c)

    but this looks like n ^ 2 complexity that is too long for the size of this table

    is there a better way?
    Thank you
    select *
      from (select t.*, count ( * ) over (partition by C) cnt
                    from table1 t)
     where cnt > 1
    
  • 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?

  • How to have some default values in all the elements that are empty in the xslt file.

    Hello

    Need help:

    Scenario:

    After transformation .xslt, there are certain elements that are mapped but left empty. I want to give him some defaults as '0'. How to do this.

    Thank you.

    you could do this:

    http://StackOverflow.com/questions/2791295/setting-default-values-for-empty-nodes

    and if you want different default values for some nodes to which you may use local-name and some other default settings listed

  • I added a 128 gB microSD card to provide the space for my photos, (a second hard drive) but lightroom won't let me not import all the pictures that are already on the map. The only import option is 'copy', not 'Add '.

    I had a problem with Lightroom on Microsoft Surface 3.  I added a 128 gB microSD card to provide the space for my photos, (a second hard drive) but lightroom won't let me not import all the pictures that are already on the map.  The only import option is 'copy', not 'Add '.  I worked around this by mounting a network directory containing photos and imported from there.  Is it possible to stop Lightroom to see such a map as a camera?

    I have not tested, but it should work with Lightroom:

    http://stltechtalk.com/ultimate-Ms-surface-hack-fully-utilize-micro-SD-card/#.

    Not sure what happens if you remove the card and put in a similar SD card. I would like to test it so that you know what to expect.

  • 8. prepare a report indicating the name of the movie and the cost of the film for all the movies that have cost more than $20.

    SELECT name, cost of movies are < $ 20

    It does not work

    I guess that all THE films cost more than $20.

    Even on the low end, Blair Witch Project was about $50,000.

    The budget for Avatar was $237 million.

  • Where can I get a list of all the updates that are available for windows 7 as well as a description of each

    I was wondering if anyone can give me a link to find all updates any importance that microsoft has come out for windows 7 and a description of each of them.

    Security bulletins: http://www.microsoft.com/technet/security/current.aspx

    Previous summaries: http://www.microsoft.com/technet/security/bulletin/summary.mspx

    Catalog: http://catalog.update.microsoft.com/v7/site/Home.aspx

    How to download drivers and updates from the Windows Update Catalog or the Microsoft Update Catalog
    http://support.Microsoft.com/kb/323166

    TaurArian [MVP] 2005-2011 - Update Services

  • For the last two weeks, I was unable to open all the emails that are in my Windows Live Hotmail folders.

    FOR THE LAST TWO WEEKS IVE HAS BEEN IMPOSSIBLE TO OPEN ANY EMAIL WHICH IS LOCATED IN ANY OF MY HOTMAIL FOLDERS. ALSO, I CAN NOT OPEN HOTMAIL WHICH IS IN THE AREA SENT, WHENEVER I TRY THE SERVER BRINGS BACK ME TO THE HOTMAIL INBOX.
    original title: I CANT ACCESS ANYTHING THAT HASBEN PLACE IN MY RECORDS or IN THE SENT BOX IT JUST FLIPS BACK to MY RECEIVING HOTMAIL Inbox

    Hello

    Given that the problem is related to hotmail, I suggest you to post the question in the forums and check them off below if it helps:
    http://windowslivehelp.com/solutions.aspx?ProductID=1

    It will be useful.

  • How can I include all the VI that are listed in the hierarchy of VI for a source distribution

    I'll send my request to another developer. To do this, I used the source distribution function. But if I generate the files I miss the VI they are stored in the form of instrument drivers. How can I include, too?

    Walter wrote:

    I'll send my request to another developer. To do this, I used the source distribution function. But if I generate the files I miss the VI they are stored in the form of instrument drivers. How can I include, too?

    This is exactly yhe reason I'll go through and save screw driver to subfolders in my application directory. In this way, I can keep the NCC updated with a complete set of code including any mods, I do the driver (usually change of reentrancy).

    But if you don't take this approach, you will have to send you a colleague from the same packeage installing driver allowing you to put it on your machine.

    Ben

  • I went to launch programs and got an error, a message "install you application seems to be damaged, please reinstall the application"-this message came for all the applications that I use regularly

    I went to use regular programs such as first today and hearing - at the launch I got the message error "installing your application appears to be damaged, please reinstall the application" - I CC application work fine until today? I don't know what to do

    Hi Sean

    Uninstall the creative cloud

    Run the CC cleaning tool: use of the Adobe Creative Cloud cleaning tool to solve installation problems

    Navigate to the OOBE folder.

    Windows: [system drive]: \Users\ [user name] \AppData\Local\Adobe\OOBE

    Mac OS: /users/folder/Library/Application Support / Adobe / OOBE

    Rename the file opm.db in opm_old.db

    Installation CC: DOWNLOAD Adobe Creative Cloud apps | CC free trial Adobe

    Try to open the Premier Pro or hearing.

    I hope this helps.

    Thank you

    Varun

  • I'm looking for all the cards that have a VIEW as the target object.

    Environment:

    OWB Tahoe development Version 11.2.0.1 Client on Windows 7
    Repositories on Oracle EE 11.2 on AIX

    Is there a way via the repository tables or OMB (shudder!) to get a list of all the cards that have a VIEW that the target object?

    Thank you very much!!

    -gary

    Try this:

    Re: How metadata repository OWB mapping?

    **************
    (1) log under user OWBSYS
    (2) run a procedure owbsys.wb_workspace_management.set_workspace

    exec owbsys.wb_workspace_management.set_workspace ('', '');
    (3) now the public view contains rows
    (4) at the end of the work to perform the owbsys.wb_workspace_management.unset_workspace procedure

    exec owbsys.wb_workspace_management.unset_workspace ();

    *************

  • SQL query to retrieve a single record for each employee of the following table?

    Hi all

    Help me on the writing of SQL query to retrieve a single record for each employee of the following table? preferably a standard SQL.

    CREATE TABLE xxc_contact)

    empnum NUMBER,

    alternatecontact VARCHAR2 (100),

    relationship VARCHAR2 (10),

    phtype VARCHAR2 (10),

    Phone NUMBER

    );

    insert into xxc_contact values (123456, 'Rick Grimes', 'SP', 'Cell', 9999999999)

    insert into xxc_contact values (123456, 'Rick Grimes', 'SP', 'Work', 8888888888)

    insert into xxc_contact values (123457, 'Daryl Dixon', 'EN', 'Work', 7777777777)

    insert into xxc_contact values (123457, 'Daryl Dixon', 'EN', 'Home', 3333333333)

    insert into xxc_contact values (123456, 'Maggie Greene', 'CH', 'Cell', 9999999999)

    insert into xxc_contact values (123456, 'Maggie Greene', 'CH', 'Home', 9999999999)

    expected result:

    EmpNum AlternateContact Relationship PhType Phone       

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    Thanks in advance.

    994122 wrote:

    Thank you all, that I got a result

    http://www.orafaq.com/Forum/m/620305/#msg_620305

    By Lalit Kumar B...

    Specifically, the two simple solutions provided were:

    1 using the row_number, entitled Oracle ranking based on descending order of the inside telephone each empnum group. And finally selects the lines which has least rank (of least since that order is descending for phone).

    SQL > column alternatecontact format A20;

    SQL >

    SQL > SELECT empnum, alternatecontact, relationship, phtype, phone

    2 from (SELECT a.*, row_number() over r (PARTITION BY empnum ORDER BY phone / / DESC))

    3 FROM xxc_contact one)

    4. WHEN r = 1

    /

    EMPNUM ALTERNATECONTACT RELATIONSHIP PHTYPE PHONE

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

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    2. with the help of MAX, Oracle automatically assigns the maximum phone for all the rows in each group of empnum. And finally selects the rows with the maximum phone. Order by clause is omitted here intentionally. You can find out why.

    SQL > SELECT empnum, alternatecontact, relationship, phtype, phone

    2 (SELECT a.*, MAX (phone) over (PARTITION BY empnum) rn FROM xxc_contact one)

    3 WHERE phone = rn

    4.

    EMPNUM ALTERNATECONTACT RELATIONSHIP PHTYPE PHONE

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

    123456 rick Grimes SP cell 9999999999

    Daryl Dixon EN work 7777777777 123457

    Home 123458 Maggie Greene CH 6666666666

    Kind regards

    Lalit

  • Find values for all variables

    Hello

    The Sub data, I want to find records where status = 1 and the values for all the questionnarie ($quest1 to Quest5) is other than 1, i.e. the value must be null, 0 or a negative integer

    Thanks in advance

    with t as

    (

    Select 101 as the nest, 1 as the status, "Cookie" as a term, 1 as $quest1, Quest2 0, 0 Quest3, 0 Quest4, 0 as Quest5 from dual union

    Select 102, 1, "Chips", 0, 0, 0, 0, 0 double Union

    Select 102, 1, "Chips", 0, 0, 0, 0, 1 double Union

    Select 102, 1, 'milk', 0, 0, 0, 0, null Union double

    Select 103, 0, 'mixture', 0, 0, 0, 0, 0 double Union

    Select 103, 1, 'sugar', 0, 0, 1, 1, 1 Union double

    Select 104, 1, 'sugar', null, null, 0, 0, 0 double Union

    Select 105, 1, 'the', 1, 1, 0, 0, -1 Union double

    Select 106, 0, 'milk', 1, 1, 0, 0, -1 double Union

    Select 106, 1, 'milk', -1, -1, 0, 0, -1 Union double

    Select 106, 1, 'milk', 0, 0, 0, 0, 0 of the double

    )

    Select * from t

    When status = 1

    Output

    NESTSTATUSTERM$QUEST1QUEST2QUEST3QUEST4QUEST5
    1021Chips00000
    1021Milk0000
    1041sugar000
    1061Milk-1-100-1
    1061Milk00000

    Select *.

    t

    When status = 1

    and nvl ($quest1, 0)<= 0="">

    and nvl (quest2, 0)<=>

    and nvl (quest3, 0)<=>

    and nvl (quest4, 0)<=>

    and nvl (quest5, 0)<=>

  • BlackBerry Z10 well defined, I can't get the phone to ring and vibrate as the default value for all calls. I can put individual contacts, but I want to ring and vibrate for all.

    Although the value, I can not phone ring and vibrate as the default value for all calls. I can put individual to vibrate and ring contacts and it works but I want as the default for all incoming calls. Any help would be appreciated, thanks

    Sorry, I found the answer in the manual

    "Change your ringtone, sounds or alerts.

    GoTo settings\notifications to the bottom of the screen select application\phone

    You can activate vibrate out there, put the ringer default etc.

  • How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Hello

    How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Thank you

    Jay.

    Select the connection and right-click on it and select schema statistics collection

Maybe you are looking for