SQL XML bulk load does not import data


 

i having difficutly importing xml data sql table using sqlxmlbulkload in dts script. symptoms table created, rows created data not populated in table.

 

i'm pretty sure error in xsd file cannot seem locate it. below xml , xsd. grateful assistance.

 

thank-you,

 

the table results are:

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

          loan_id     loan_name

1           null               null

2           null               null

 

 

the xml:

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

<?xml version="1.0" encoding="utf-8" ?>
   <loanexport>
         <loandata
                 loan_id = "1712342"
                 loan_name = "test line of credit1"
           />
         <loandata
                loan_id = "1712343"
                loan_name = "test line of credit2"
          />

</loanexport>

 

the xsd:

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

<xsdtongue tiedchema xmlns:xsd="http://www.w3.org/2001/xmlschema"
            xmlnstongue tiedql="urntongue tiedchemas-microsoft-com:mapping-schema">
 <xsd:element name="loanexport" sql:is-constant="true">
  <xsd:complextype>
   <xsdtongue tiedequence maxoccurs="unbounded">
    <xsd:element name="loandata" sql:relation="loandata">
     <xsd:complextype>
      <xsdtongue tiedequence>
         <xsd:element name="loan_id" sql:field="loan_id" sqlbig smileatatype="varchar(10)"/>
         <xsd:element name="loan_name" sql:field="loan_name" sqlbig smileatatype="varchar(255)"/>
      </xsdtongue tiedequence>
     </xsd:complextype>
    </xsd:element>
   </xsdtongue tiedequence>
  </xsd:complextype>
 </xsd:element>
</xsdtongue tiedchema>

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

 

 



SQL Server  >  SQL Server XML



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607