Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Basics of XML and SQL Server, Part 4: Create an XML invoice with SSIS Expand / Collapse
Author
Message
Posted Wednesday, March 28, 2012 12:05 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, August 11, 2014 8:51 AM
Points: 128, Visits: 911
Comments posted to this topic are about the item Basics of XML and SQL Server, Part 4: Create an XML invoice with SSIS
Post #1274063
Posted Wednesday, March 28, 2012 6:22 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 5:44 AM
Points: 1,561, Visits: 1,338
Nice article...thanks.

- Chris
Post #1274233
Posted Wednesday, March 28, 2012 6:24 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, August 11, 2014 8:51 AM
Points: 128, Visits: 911
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/
Post #1274234
Posted Friday, March 30, 2012 6:25 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 9:25 AM
Points: 51, Visits: 377
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')

Post #1275692
Posted Friday, March 30, 2012 1:08 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, August 11, 2014 8:51 AM
Points: 128, Visits: 911
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.
Post #1275990
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse