这是我的数据:
+----+------------------+--------------------+
| ID | DateTime Entered | DateTime Completed |
+----+------------------+--------------------+
| 1 | 6/17/2011 10:08 | 6/18/2011 14:39 |
| 2 | 5/10/2011 9:29 | 5/15/2011 17:29 |
| 3 | 3/2/2009 9:30 | 3/3/2009 13:40 |
| 4 | 3/3/2009 11:36 | 3/4/2009 16:39 |
| 5 | 3/3/2009 11:37 | 3/4/2009 16:39 |
| 6 | 3/3/2009 11:38 | 3/4/2009 16:39 |
| 7 | 3/3/2009 11:38 | 3/4/2009 16:38 |
| 8 | 3/3/2009 11:38 | 3/5/2009 9:08 |
| 9 | 1/10/2011 9:43 | 1/11/2011 13:13 |
| 10 | 2/11/2011 12:20 | 2/12/2011 15:01 |
| 11 | 8/14/2009 10:20 | 8/17/2009 15:56 |
| 12 | 11/19/2008 9:45 | 11/20/2008 14:56 |
| 13 | 2/10/2011 13:50 | 2/11/2011 19:36 |
| 14 | 8/14/2009 10:23 | 8/17/2009 15:56 |
| 15 | 8/17/2009 9:43 | 8/18/2009 13:56 |
| 16 | 8/17/2009 9:43 | 8/19/2009 6:47 |
| 17 | 8/14/2009 10:28 | 8/17/2009 15:56 |
| 18 | 12/17/2008 10:03 | 12/18/2008 11:07 |
| 19 | 1/13/2009 9:41 | 1/14/2009 18:11 |
| 20 | 1/20/2009 9:18 | 1/21/2009 15:08 |
| 21 | 2/12/2009 10:53 | 2/13/2009 15:21 |
| 22 | 1/20/2009 9:19 | 1/21/2009 15:08 |
| 23 | 1/13/2009 9:50 | 1/15/2009 8:45 |
| 24 | 1/13/2009 9:50 | 1/14/2009 14:40 |
| 25 | 1/13/2009 9:36 | 1/14/2009 18:11 |
| 26 | 12/17/2008 10:06 | 12/18/2008 11:06 |
| 27 | 12/17/2008 10:04 | 12/18/2008 11:06 |
| 28 | 3/30/2010 9:20 | 3/31/2010 13:44 |
| 29 | 1/25/2010 9:33 | 1/26/2010 14:20 |
| 30 | 1/30/2009 11:21 | 2/2/2009 14:44 |
| 31 | 6/17/2010 9:07 | 6/18/2010 14:17 |
| 32 | 6/16/2010 10:24 | 6/17/2010 16:20 |
| 33 | 6/14/2010 9:33 | 6/15/2010 8:52 |
| 34 | 5/27/2010 9:15 | 5/28/2010 14:15 |
| 35 | 5/27/2010 10:16 | 5/28/2010 15:51 |
| 36 | 5/21/2010 9:15 | 5/23/2010 13:05 |
| 37 | 5/19/2010 10:08 | 5/20/2010 13:33 |
| 38 | 6/30/2010 11:41 | 7/1/2010 18:16 |
+----+------------------+--------------------+
这是我想输入的格式。对于特定的年份,我们称之为2008
:
Time Completed Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
12AM 1
1AM 2 1
2AM 1 1 1
3AM 3
4AM 342 1
. 32 34
. 42
.
NEXT DAY 12AM 2 1
NEXT DAY 1AM 1
.
.
…………
DateTime Entered
给了我们开始的一天,DateTime Completed
给了我们完成的时间。
例如第一个。它将有一个完整的时间,14:39
而对于第二个它将是5th day 15:29
。第三个是2nd day 13:40
非常感谢您的建议和指导。如果您能指出我正确的方向,我将不胜感激。
SQL 或 SSRS 解决方案将是理想的。