question

mvramana avatar image
mvramana asked

how to write query to get weekly details and tabledetails are narmal as you like

date1, date2, date3, date4, date5, date6, date7 ---------- employee name xxx xxx xxxx xxxx xxxx xxxxx xxxxx employee name
sql-server-2005querystored-proceduressql-server-express
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Fatherjack avatar image
Fatherjack answered
You ought to to data formatting like this in the UI rather than in TSQL. If you can tell us more about your problem we may be able to help you more. If you *must* format the results as you show then you need to read about `PIVOT` - http://msdn.microsoft.com/en-us/library/ms177410(v=sql.105).aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.