|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
select b.[Staff ID],a.[OT Year],a.[OT Month],a.[OT Date],[Total(Hours)],b.[Current Sub-team],count([Staff ID]) as 人数 from(select b.[Staff ID],a.[OT Year],a.[OT Month],a.[OT Date],a.[Total(Hours)]*1 as [Total(Hours)],b.[Current Sub-eam] from [Current Staff$]b left join [OT Record$]a on a.[Staff NO]=b.[Staff ID] where b.[Staff ID] is not null) group by b.[Staff ID],a.[OT Year],a.[OT Month],a.[OT Date],[Total(Hours)],b.[Current Sub-team]
[ 本帖最后由 抹香鲸2009 于 2010-6-9 20:07 编辑 ] |
|