|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 3:24 PM
Points: 80,
Visits: 627
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 10:20 AM
Points: 1,389,
Visits: 1,088
|
|
Nice article...thanks.
- Chris
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 3:24 PM
Points: 80,
Visits: 627
|
|
Part 1: http://www.sqlservercentral.com/articles/XML/87539/
Part 2: http://www.sqlservercentral.com/articles/XML/87685/
Part 3: http://www.sqlservercentral.com/articles/XML/87637/
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 8:55 AM
Points: 39,
Visits: 292
|
|
The approach presented works well for a single client. I'm not sure how it would work in the current format if multiple clients needed to be shown. Something like this would work well for multiple clients.
select *, ( select * from dbo.sales s where s.clientid = c.clientid for xml path ('Sale'), type ) as Sales, ( select * from dbo.vendor for xml path ('Vendor'), type ) from dbo.clients c for xml path ('Clients'), root ('ClientOrders')
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 3:24 PM
Points: 80,
Visits: 627
|
|
| In the next article out next Wednesday I create an SSIS package that emails/ftps invoices to individual customers. That's why I wrote it for one customer at a time.
|
|
|
|