AnsweredAssumed Answered

Splitting information from a stored procedure

Question asked by mrelzer on Jul 24, 2017
Latest reply on Jul 25, 2017 by mrelzer

I am consuming a stored procedure which returns data similar to:

 

SHIPMENTID   CARRIER   LINENO   MATERIAL

 

An example of the data may look like:

 

10001   UPS   100   ABC

10001   UPS   200   XYZ

10002   FEDEX   100   ABC

10002   FEDEX   200   XYZ

10002   FEDEX   300   MRE

 

 

I need to process the records (get them in the same document) that have the same shipmentid together (the query returns them in numerical order if that matters).

 

I can split each record to an individual document (mapping from database to XML), but I can't figure out how to group them by the shipmentid (at the time of splitting, or by combining them together after the split). I assume I'm missing something simple, but I just don't seem to be getting anywhere.

Outcomes