x
login about faq Site discussion (meta-askssc)

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 '10 at 03:53 PM in Default

Katie 1 gravatar image

Katie 1
1.4k 110 161 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 '10 at 06:44 PM

Oleg gravatar image

Oleg
15.4k 1 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.

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



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1612
x609
x116
x67

asked: Jun 22 '10 at 03:53 PM

Seen: 3775 times

Last Updated: Jun 22 '10 at 03:53 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.