Load command to load data from an XML file to a table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tbtcust
    New Member
    • May 2019
    • 1

    Load command to load data from an XML file to a table

    Hello All,

    I have data in a well-formed xml file. I’d like to use the db2 load command load the data into a table. Would someone guide me on how to code the Load command to accomplish this task? Example:

    Code:
    <Person gender="Male">
      <Name>
        <Last>Cool</Last>
        <First>Joe</First>
      </Name>
      <Confidential>
        <Age unit="years">5</Age>
        <Birthdate>2002-03-16</Birthdate>
        <SS>111-22-3333</SS> 
      </Confidential>
      <Address>5224 Rose St. San Jose, CA 95123</Address>
    </Person>
    Target Person Table: All columns are varchar 254
    Code:
    LAST_NAME  FIRST_NAME  AGE  BIRTHDATE   ADDRESS
    Cool       Joe         5    2002-03-16  5224 Rose St...


    Thanks in advance for any help
Working...