Avatar of Peter Nordberg
Peter Nordberg
Flag for Sweden

asked on 

Format a result from several rowns into one

Hi,

I have this query looking like this:
SELECT * FROM dbo.EmployeeWorkTimeSchedule AS ewts WHERE EmployeeID = 2514 AND MONTH(ewts.fromDate) = 12

Open in new window


And giving the following result:
Result
How can I make a query so that the rusult will be formatted like this?
2018-12-01   Pass 1: 8:00-12:00 | Lunch: 12:00 - 13:00 | Pass 2: 13:00-17:00
2018-12-02   Pass 1: 8:00-12:00 | Lunch: 12:00 - 13:00 | Pass 2: 13:00-17:00

Thanks for help!

Peter
* T-SQLMicrosoft SQL Server

Avatar of undefined
Last Comment
Peter Nordberg

8/22/2022 - Mon