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:
----------------------------------------------------------------------------------------------------------------
<xsdchema xmlns:xsd="http://www.w3.org/2001/xmlschema"
xmlnsql="urnchemas-microsoft-com:mapping-schema">
<xsd:element name="loanexport" sql:is-constant="true">
<xsd:complextype>
<xsdequence maxoccurs="unbounded">
<xsd:element name="loandata" sql:relation="loandata">
<xsd:complextype>
<xsdequence>
<xsd:element name="loan_id" sql:field="loan_id" sqlatatype="varchar(10)"/>
<xsd:element name="loan_name" sql:field="loan_name" sqlatatype="varchar(255)"/>
</xsdequence>
</xsd:complextype>
</xsd:element>
</xsdequence>
</xsd:complextype>
</xsd:element>
</xsdchema>
----------------------------------------------------------------------------------------------------------------
SQL Server > SQL Server XML
Comments
Post a Comment