Hi @GeethaThatipatri-MSFT ,
Thx for testing the code.
My goal is to create table without data regarding xml schema.
I suppose there is not such a thing on SQL... Unfortunate
If i take the example below :
XML (Input)
<EntityType Name="BuyerParty">
<Key>
<PropertyRef Name="ObjectID"/>
</Key>
<Property Name="ObjectID" Type="Edm.String" Nullable="false" MaxLength="70" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<Property Name="ParentObjectID" Type="Edm.String" Nullable="true" MaxLength="70" FixedLength="true" sap:creatable="true" sap:updatable="false" sap:filterable="true"/>
<Property Name="PartyID" Type="Edm.String" Nullable="true" MaxLength="60" FixedLength="true" sap:creatable="false" sap:updatable="false" sap:filterable="true"/>
<NavigationProperty Name="CustomerInvoice" Relationship="cust.CustomerInvoice_BuyerParty" FromRole="BuyerParty" ToRole="CustomerInvoice"/>
<NavigationProperty Name="BuyerPartyName" Relationship="cust.BuyerParty_BuyerPartyName" FromRole="BuyerParty" ToRole="BuyerPartyName"/>
<NavigationProperty Name="BuyerPartyFormattedAddress" Relationship="cust.BuyerParty_BuyerPartyFormattedAddress" FromRole="BuyerParty" ToRole="BuyerPartyFormattedAddress"/>
</EntityType>
SQL (Output)
Create table BuyerParty
I didn't write the FK associate to BuyerPartyName & BuyerPartyFormattedAddress.
Have a nice day