Dear Yehuda,
I'm having problem in mapping my .xsd file.
I'll appreciate if you can help me since as I saw you dealt with the same problems.
I'll describe my problem:
I'm using SQLXMLBulkLoad to load the xml data
my .xsd schema is:
<xsd:element name="OrderDetail"/>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CompanyID"/>
<xsd:element name="CompanyName"/>
<xsd:element name="OrderDate"/>
<xsd:element name="Price"/>
</xsd:sequence>
</xsd:complexType>
example xml:
<OrderDetail>
<CompanyID>123</CompanyID>
<CompanyName>ABC</CompanyName>
<OrderDate>2002-10-10</OrderDate>
<Price>100$</Price>
</OrderDetail>
I've 2 tables which I want to update using this xml file:
Table Company:
===========
CompanyID (primary)
CompanyName
Table Orders:
==========
CompanyID (primary, foreign from Company)
OrderDate
Price
I have not succee to put the right mapping.
how do I put the "sql:relation" annotation in 'OrderDetail' when its data should update the two tables in fields that are not the primary-key ? (CompanyName --> Company
and
OrderDate,Price --> Orders)
Best Regards
|