Load table in SQL 2005 Express ed.

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

From: fewgoodpeople (fewgoodpeople_at_hotmail.com)
Date: 07/16/04


Date: 16 Jul 2004 16:00:25 -0700

Problems: 1. Connection
          2. Insert statements 3500 lines, on 70 columns takes forever

I need to generate a xml data file based on a XSD provided from the
database. I ran into SQL Hell problems because the XSD is rather huge
(30+ leaf). Therefore, I need to use the new FOR XML query shown
below, to achive that:

(From Michael Rys)
select CustomerID as "@ID",
      (select OrderID as "data()"
       from Orders
       where Customers.CustomerID=Orders.CustomerID
       FOR XML PATH('')
      ) as "@OrderIDs",
       CompanyName,
       ContactTitle as "ContactName/@ContactTitle",
       ContactName as "ContactName/text()",
       PostalCode as "Address/@ZIP",
       Address as "Address/Street",
       City as "Address/City"
FROM Customers
FOR XML PATH('Customer')

But without the data in the table (in the newly created SQL Server
2005 Express ed), I can impossibly generate XML data. I can't use DTS
to connect this server, nor can I run insert statements of 3500 rows,
70 columns. Is there anything I can do in the weekend?

Thanks.



Relevant Pages

  • Generate XML Data in SQL 2005 Express
    ... I need to generate a xml data file based on a XSD provided from the ... I ran into SQL Hell problems because the XSD is rather huge ... But without the data in the table (in the newly created SQL Server ... I can impossibly generate XML data. ...
    (microsoft.public.sqlserver.xml)
  • Re: annotation issue with SQLXML - BulkLoad
    ... I made it work with your xsd schema. ... Still does not understand, when SQLXML Bulk Load creates the table, how ... it picks SQL Server default value, without looking at the entire xml data ... This has something to do with missing annotation, ...
    (microsoft.public.sqlserver.xml)
  • SQLXMLBulkLoadl into Multiple tables.
    ... I am trying to insert XML data into multiple SQL Server tables with SQLXML ... Following is XML AND XSD which is inserting records into two ... "No data was provided for column 'maid' on table 'TestDetails', ...
    (microsoft.public.sqlserver.xml)
  • Re: SQLXMLBulkLoadl into Multiple tables.
    ... > Could you give it a try by removing the explicit mapping on the maid column ... > of TestDetails table like this: ... >> I am trying to insert XML data into multiple SQL Server tables with SQLXML ... Following is XML AND XSD which is inserting records into two ...
    (microsoft.public.sqlserver.xml)
  • Re: General Question
    ... An XSD isn't going to help you with since XSDs only work against XML data, not a flat file. ... You might want to look at Integration Services instead, particuarly with that number of columns. ...
    (microsoft.public.sqlserver.xml)