SELECT [User_Id], MAX([1]) AS [1], MAX([2]) AS [2], MAX([3]) AS [3], MAX([4]) AS [4] FROM [first_db].[dbo].[MarkA] PIVOT ( MAX(Status) FOR Date in ([1],[2],[3],[4]) )as pvt GROUP BY [User_Id] ORDER BY [User_Id]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)