sql >> Database >  >> RDS >> Oracle

Hoe de xmlconcat-functie in oracle te gebruiken

WITH vw_cdic_uci_detail AS ( SELECT 546 AS vcud_lei, 'BMO2100001200001' AS vcud_uci, 50 AS vcud_per FROM DUAL UNION ALL
                             SELECT 546 AS vcud_lei, 'BMO2100005500012' AS vcud_uci, 50 AS vcud_per FROM DUAL
                           )
SELECT XMLELEMENT( "BusProcess",
          XMLFOREST(
             XMLFOREST( '65443W404' AS "CUSIP",
                        100         AS "RUP",
                        2500        AS "ACB"
             ) AS "CRR"
          ),
          XMLELEMENT("LEI", vcud_lei),
          XMLCONCAT( AddModCDIC ) AS "AddModCDIC"
       )
  FROM ( SELECT vcud_lei,
                CASE
                   WHEN 1=1
                   THEN
                   XMLCONCAT(
                      XMLELEMENT("AddModCDIC",
                         XMLELEMENT("CDICData",
                            XMLAGG(
                                     XMLELEMENT("UCIData",
                                        XMLFOREST(vcud_uci AS "UCI",
                                                  vcud_per AS "InterestlnDeposit"
                                  )
                               )
                            )
                         )
                      )
                   ) 
                   ELSE NULL
                END AS AddModCDIC
           FROM vw_cdic_uci_detail
          GROUP BY vcud_lei
      ) a;



  1. ORACLE SDO_GEOMETRY ToString()?

  2. Verwijder lege tag van xmltype oracle

  3. Hoe laad ik een lokaal .SQL-bestand in MySQL?

  4. Een goede gewoonte om verbindingen in een asp.net-toepassing te openen/sluiten?