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 ««12

How to find orders that contain the same product Expand / Collapse
Author
Message
Posted Thursday, August 29, 2013 9:51 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 8:22 PM
Points: 133, Visits: 323
Thank you Sean.
Post #1489997
Posted Thursday, August 29, 2013 10:02 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 8:22 PM
Points: 133, Visits: 323
Jeff,

My apologies for being slow on understanding your question.
Your question is a valid question. I am doing database development for the application teams. The teams services that take the "result set" from my sprocs and uses C# code to serialize the result set into an xml message to send over the network to other services.
They prefer having a result set of 1 row with multiple columns.
One of the columns happens to be the comma delimited string that I had asked for help. Both teams ( the sender service and the receiver service) prefer having:

<element1>xxxx</element1>
<element2>xxxx</element2>
...
<elementn>xxxx</elementn>

to easily shred the xml message.
Needless to say that the comma delimited string will be split to a table for processing....
Post #1489998
Posted Thursday, August 29, 2013 10:07 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:40 AM
Points: 35,265, Visits: 31,754
In that case, why not just return the value in the XML format that they want? It's pretty easy to do. In fact, the solution that Sean posted for the CSV format is just about there.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1489999
Posted Friday, August 30, 2013 1:32 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Tuesday, July 1, 2014 8:22 PM
Points: 133, Visits: 323
Yes, I can return data in xml format. The same sproc output is used by the app UI code and the app service code. App UI needs data in "ready to use" state to decide where and what to render. App service code sometimes is based on XML or JSON serialization.
Post #1490276
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse