troubleshooting Question

SQL 2005 - Combine data from field across multiple rows into a derived field on a single row

Avatar of dpmoney
dpmoneyFlag for United States of America asked on
Microsoft SQL ServerMicrosoft SQL Server 2005SQL
7 Comments1 Solution714 ViewsLast Modified:
Hello experts,

This has been asked before, but I'm not seeing an exact match on what I need to do.  

Overall, I have a table of sales reps and they make sales with the help of assistants.

I need to send emails to the sales reps and CC: all the assistants who have helped during the months.  The trick is I need to combine the email address from each sales rep (across multiple rows) into a single derived field.

I also need to see a total of all sales that sales rep did across ALL Assistants.

I've attached an Excel example excerpt that really describes this well. A picture is worth a thousand words I guess.

Looking forward to some really great help as usual!

Thanks!
SQL-Challenge.PNG
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros