Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 convert sql 2005 table to xsd file and back

Author  Topic 

coder
Starting Member

16 Posts

Posted - 2007-05-18 : 06:54:49
Hi,

I was wondering if there is a way to convert a table from an sql 2005 db to an xsd file on my hard drive? And also, is there a way to change an xsd file on my hard drive into an sql 2005 table? Thanks!

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-18 : 09:40:46
why xsd?
backup isn't good enough?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

rudesyle
Posting Yak Master

110 Posts

Posted - 2007-05-18 : 09:52:02
This seems like something that could be done with Sql 2k5's Integration Services. You'd have to dig into it a little though.
Go to Top of Page

rudesyle
Posting Yak Master

110 Posts

Posted - 2007-05-18 : 10:49:05
Actually, it's real easy to generate xml schema for a sql table :

SELECT YourCol1,YourCol2,YourCol3......
FROM YourTableName
FOR XML AUTO,XMLSCHEMA

All you would do is cut and paste the results into your schema file.
Go to Top of Page
   

- Advertisement -