troubleshooting Question

T-SQL (Sql Server 2008) to output rows to columns by joinging base table

Avatar of kishan66
kishan66Flag for United States of America asked on
Microsoft SQL Server 2008SQL
4 Comments2 Solutions454 ViewsLast Modified:
I have two tables…… RoleMasterTable & TeamTable … and I want to combine them to third table TeamRoleTable using sql (Sql Server 2008)
... pls let me know how do i do that

RoleMasterTable
RoleID          Role
1      Manager
2      Lead
3      Member
 
TeamTable
  MANAGER               LEAD                  Member
Chris John      Keith Silverman      MIchel Jim
Chris John      Keith Silverman      Nick Kanon
Chris John      Mark Weith      Tom Thomb
Chris John      Harry Poter      Zach Hassle

OutPut to TeamRoleTable should be ……

TeamRoleTable
RoleID            Name
1                    Chris John
2                  Keith Silverman
2                 Mark Weith
2                Harry Poter
3                 MIchel Jim
3      Nick Kanon
3      Tom Thomb
3      Zach Hassle



Thanks
ASKER CERTIFIED SOLUTION
alpmoon
Sybase DBA

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
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 2 Answers and 4 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