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

Katie 1 gravatar image

Katie 1
1.4k 132 163 202

(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

Oleg gravatar image

Oleg
15.9k 2 4 24

(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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

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:

x1850
x736
x150
x84

asked: Jun 22, 2010 at 03:53 PM

Seen: 5991 times

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