I have a query that is returning project IDs, project names, and project types. Some projects have multiple types, so I am getting the same project ID more than once for some because they will have more than one project type. Many projects only have one type though.
Example of what it's doing:
| Project_ID | Project_Name | Project_Type |
| 94850 | Convert to C# | .Net |
| 94850 | Convert to C# | SQL |
Here is what I want it to do:
| Project_ID | Project_Name | Project_Type |
| 94850 | Convert to C# | .Net, SQL |
I do not want anything but the Project Type to be pivoted this way. Would this be something for PIVOT
or something else?
SELECT PL.Project_ID,
PL.Project_Name,
PT.Project_Type
FROM Project_List PL
INNER JOIN Project_Types PT ON PL.Project_ID = PT.Project_ID
WHERE ProjectDate BETWEEN (@Start) AND (@End)