Re: Is there a way to convert ms sql 2008 tables to XML files?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



OK Thanks Erland.

"Erland Sommarskog" <esquel@xxxxxxxxxxxxx> wrote in message news:Xns9C28A4C25414FYazorman@xxxxxxxxxxxx
Eric S (NoSpam@xxxxxxxxxxx) writes:
Is there a way to convert ms sql 2008 tables to XML files?
Say I have several tables related to each other and I want to create the
hierarchy of the data such as parent child within the XML

These are small tables where I store the data of menu options and sub
options etc...

Check out the FOR XML clause in Books Online.



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

.



Relevant Pages

  • Re: IDENT_CURRENT and empty table
    ... >> And there is no definition what the result will be after fixing the bug. ... Books Online for 2005 is wrong and will be updated. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: sorting twice?!
    ... So I run a query to select the top 20 when ordered by datemodified ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Rolling up spans without breaks between them
    ... CREATE TABLE periods (start datetime NOT NULL, ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Error: 16954, Severity: 10, State: 1 and Timeout problem
    ... On this DB are runing lot of threads from different applications. ... Probably, other aplication are locking resources, so the first one need ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Systematically determine DRI problem(s)
    ... "the original designer probably meant to link them via customer_ID" ... Erland Sommarskog wrote: ... >> of effort to find data problem for the given situation, ... > Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)