So I have a log table that is putting in data like:
LogId SiteNumber Unit IDNumber LogCode EnteredDateTime ChangeMode HowEntered
----- ---------- ---- -------- ------- ---------------- ---------- -----------
851 1 16 - 0 23502 BDISCHSET 2011-11-12 11:48:08.890 Discharging Soon SERIES
866 1 16 - 0 NULL BDISCHRED 2011-11-12 21:45:11.657 Discharged SERIES
113 2 2001 - 0 12384 BDISCHSET 2011-10-28 09:27:08.773 Discharging Soon SERIES
125 2 2001 - 0 NULL BDISCHRED 2011-10-28 10:38:08.060 Discharged SERIES
119 2 2002 - 0 12394 BDISCHSET 2011-10-28 10:01:12.443 Discharging Soon SERIES
139 2 2002 - 0 NULL BDISCHRED 2011-10-28 14:01:11.120 Discharged SERIES
776 2 2002 - 0 12331 BDISCHSET 2011-11-10 09:08:09.443 Discharging Soon SERIES
783 2 2002 - 0 NULL BDISCHRED 2011-11-10 11:08:08.537 Discharged SERIES
我需要做的是把每人的记录分类,并计算出遣散所需的时间。
For example: Unit 2002 - 0 has two different people to group, it would be:
个人12394 页: 1
排出2小时
任何帮助都将受到高度赞赏。