kishan66
asked on
T-SQL (Sql Server 2008) to output rows to columns by joinging base table
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
... 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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was fast.....
It works ..
It works ..
Open in new window