I have a table say Timesheet, which is having one week hour entry stored as a row. Eg:
ID Start Date Sun Mon Tue Wed Thu Fri Sat
-------------------------------------------------
1 14-Oct-2012 0 1 1 2 3 5 0
The start date is always Sunday's date. I need to export this data into multiple rows, one row for each date, based on input criteria.
For example, if the input criteria is: Date is between 15-Oct-2012 to 17-Oct-2012, my output should be something like:
Date Hours
------------
15-Oct 1
16-Oct 1
17-Oct 2
I am using SQL Server 2000, please suggest me a way.