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.
| Author |
Topic |
|
Progress2007
Starting Member
17 Posts |
Posted - 2008-08-25 : 08:03:57
|
| HelloI am a newbie for SQLServer 2005. Is there any inbuild functionality exist so that i could able to extract the XML of a table .If such thing exist in this table then please let me know how to do this. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-25 : 08:04:51
|
| XML of a table? do you mean xml of data? Then have a look at FOR XML in books online. |
 |
|
|
Progress2007
Starting Member
17 Posts |
Posted - 2008-08-25 : 08:06:42
|
| Thnx for ur response. I just want to know that as we can generate script of a database or table, can we do the same thing, means can we generate XML format of a table inside SQL Server 2005 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-08-25 : 08:13:51
|
| select * from table for xml autoMadhivananFailing to plan is Planning to fail |
 |
|
|
Progress2007
Starting Member
17 Posts |
Posted - 2008-08-25 : 08:21:18
|
| Thnx again for ur response......but tell me one more thing how to get the schema of a table in XML format |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-08-25 : 08:26:39
|
quote: Originally posted by Progress2007 Thnx again for ur response......but tell me one more thing how to get the schema of a table in XML format
select * FROm INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='YourTableName' FOR XML AUTO |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-08-25 : 09:09:54
|
| SELECT * FROM YourTableName FOR XML AUTO, ELEMENTS, XMLSCHEMA('YourTableName')_______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
 |
|
|
|
|
|