x

Create database table from XSD

ALL,

i want to know if there is a tool or a process to actually create the database or the database tables, if we have the XSD. to put it in other words, how do we utilize the XSD to create sql server database tables.

    <xsd:element name="ABC">
     <xsd:complexType>
  <xsd:attribute name="MTR_KEY" use="required">
    <xsd:simpleType>
      <xsd:restriction base="sqltypes:varchar" sqltypes:localeId="1033" sqltypes:sqlCompareOptions="IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId="52">
        <xsd:maxLength value="25" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:attribute>
  <xsd:attribute name="TRAN_DATE" type="sqltypes:datetime" use="required" />
  <xsd:attribute name="VERSION" use="required">
    <xsd:simpleType>
      <xsd:restriction base="sqltypes:numeric">
        <xsd:totalDigits value="2" />
        <xsd:fractionDigits value="0" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:attribute>
  <xsd:attribute name="FILE_ID" use="required">
    <xsd:simpleType>
      <xsd:restriction base="sqltypes:numeric">
        <xsd:totalDigits value="9" />
        <xsd:fractionDigits value="0" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:attribute>
  <xsd:attribute name="ROW_STATE" use="required">
    <xsd:simpleType>
      <xsd:restriction base="sqltypes:numeric">
        <xsd:totalDigits value="5" />
        <xsd:fractionDigits value="2" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:attribute>
  <xsd:attribute name="PROCESS_STATE" use="required">
    <xsd:simpleType>
      <xsd:restriction base="sqltypes:numeric">
        <xsd:totalDigits value="5" />
        <xsd:fractionDigits value="2" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:attribute>
  <xsd:attribute name="LST_MODIFIED_DT" type="sqltypes:datetime" />
  <xsd:attribute name="LST_MODIFIED_USER">
    <xsd:simpleType>
      <xsd:restriction base="sqltypes:varchar" sqltypes:localeId="1033" sqltypes:sqlCompareOptions="IgnoreCase IgnoreKanaType IgnoreWidth" sqltypes:sqlSortId="52">
        <xsd:maxLength value="30" />
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:attribute>
</xsd:complexType>

more ▼

asked Jun 22, 2010 at 03:53 PM in Default

avatar image

Katie 1
1.4k 132 164 205

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Here is the link to the post: http://social.msdn.microsoft.com/forums/en-US/sqlxml/thread/d8a68d63-832c-4393-8fd5-2f7445220172/ Basically, it involves opening BIDS and creating SSIS project with XML source.

Oleg

more ▼

answered Jun 22, 2010 at 06:44 PM

avatar image

Oleg
17.1k 3 7 28

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x2079
x994
x186
x111

asked: Jun 22, 2010 at 03:53 PM

Seen: 8645 times

Last Updated: Jun 22, 2010 at 03:53 PM

Copyright 2016 Redgate Software. Privacy Policy