Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2000-10-26 : 20:32:21
|
patrick writes "Dear esteemed Gurus, I want to list users and all of their projects like below. How do i combine the results of one column and show distinct users to get the following result?: Full_Name Project_Name --------------------------------------------------- dan mcgrew NULL sam mcgee another project,test project toy wonder NULL willy rope another project,test project
Currently this is what I am doing:
SELECT USERS.First_Name + ' ' + USERS.Last_Name AS Full_Name, PROJECTS.Project_Name FROM USER_XREF INNER JOIN PROJECTS ON USER_XREF.Project_Id = PROJECTS.Project_Id RIGHT OUTER JOIN USERS ON USER_XREF.User_Id = USERS.User_ID ORDER BY Full_Name
Returning
Full_Name Project_Name --------------------------------------------------- dan mcgrew NULL sam mcgee another project sam mcgee test project toy wonder NULL willy rope another project willy rope test_project" |
|
|
|
|
|