i have 2 tables:
Cust( CustomerID int,
CompanyName varchar(20),
City varchar(20))
CustOrder (OrderID,
CustomerID foreign key references Cust(CustomerID))
i am getting error when trying to load xml file:
"no data was provided for column 'OrderId' on table 'CustOrder'."
the xdr schema is:
<?xml version="1.0" ?>
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:xml:datatypes"
xmlns:sql="urn:schemas-microsoft-com:xml-sql" >
<ElementType name="CustomerID" dt:type="int" />
<ElementType name="CompanyName" dt:type="string" />
<ElementType name="City" dt:type="string" />
<ElementType name="OrderID" dt:type="int" />
<ElementType name="root" sql:is-constant="1">
<element type="Customers" />
</ElementType>
<ElementType name="Customers" sql:relation="Cust" >
<AttributeType name="CustomerID" />
<AttributeType name="CompanyName" />
<AttributeType name="City" />
<attribute type="CustomerID" sql:field="CustomerID" />
<attribute type="CompanyName" sql:field="CompanyName" />
<attribute type="City" sql:field="City" />
<element type="Order" >
<sql:relationship
key-relation="Cust"
key="CustomerID"
foreign-key="CustomerID"
foreign-relation="CustOrder" />
</element>
</ElementType>
<ElementType name="Order" sql:relation="CustOrder" >
<AttributeType name="CustomerID" />
<AttributeType name="OrderID" />
<attribute type="CustomerID" sql:field="CustomerID"/>
<attribute type="OrderID" sql:field="OrderID"/>
</ElementType>
</Schema>
the xml data source is:
<ROOT>
<Customers>
<CustomerID>1111</CustomerID>
<CompanyName>Sean Chai</CompanyName>
<City>NY</City>
<Order>
<OrderID>1</OrderID>
</Order>
<Order>
<OrderID>2</OrderID>
</Order>
</Customers>
<Customers>
<CustomerID>1112</CustomerID>
<CompanyName>Tom Johnston</CompanyName>
<City>LA</City>
<Order>
<OrderID>3</OrderID>
</Order>
</Customers>
</ROOT>
any help would be greatly appreciated.
Cust( CustomerID int,
CompanyName varchar(20),
City varchar(20))
CustOrder (OrderID,
CustomerID foreign key references Cust(CustomerID))
i am getting error when trying to load xml file:
"no data was provided for column 'OrderId' on table 'CustOrder'."
the xdr schema is:
<?xml version="1.0" ?>
<Schema xmlns="urn:schemas-microsoft-com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:xml:datatypes"
xmlns:sql="urn:schemas-microsoft-com:xml-sql" >
<ElementType name="CustomerID" dt:type="int" />
<ElementType name="CompanyName" dt:type="string" />
<ElementType name="City" dt:type="string" />
<ElementType name="OrderID" dt:type="int" />
<ElementType name="root" sql:is-constant="1">
<element type="Customers" />
</ElementType>
<ElementType name="Customers" sql:relation="Cust" >
<AttributeType name="CustomerID" />
<AttributeType name="CompanyName" />
<AttributeType name="City" />
<attribute type="CustomerID" sql:field="CustomerID" />
<attribute type="CompanyName" sql:field="CompanyName" />
<attribute type="City" sql:field="City" />
<element type="Order" >
<sql:relationship
key-relation="Cust"
key="CustomerID"
foreign-key="CustomerID"
foreign-relation="CustOrder" />
</element>
</ElementType>
<ElementType name="Order" sql:relation="CustOrder" >
<AttributeType name="CustomerID" />
<AttributeType name="OrderID" />
<attribute type="CustomerID" sql:field="CustomerID"/>
<attribute type="OrderID" sql:field="OrderID"/>
</ElementType>
</Schema>
the xml data source is:
<ROOT>
<Customers>
<CustomerID>1111</CustomerID>
<CompanyName>Sean Chai</CompanyName>
<City>NY</City>
<Order>
<OrderID>1</OrderID>
</Order>
<Order>
<OrderID>2</OrderID>
</Order>
</Customers>
<Customers>
<CustomerID>1112</CustomerID>
<CompanyName>Tom Johnston</CompanyName>
<City>LA</City>
<Order>
<OrderID>3</OrderID>
</Order>
</Customers>
</ROOT>
any help would be greatly appreciated.