Quantcast
Channel: iT邦幫忙
Viewing all articles
Browse latest Browse all 15645

如何將以下SQL語法,用VBA方式寫出來?我想輸入"特休假",輸入時間起迄範圍,然後產生查詢結果。

$
0
0
SELECT * from TEST

SELECT ApplyerDeptName,ApplyName,HR10day,sum(HRdays)as UsedDay,(HR10day-sum(HRdays))as UnusedDay
FROM afu_form_HR10 inner join TEST on
afu_form_HR10.ApplyName=TEST.HR10name where ApplyDateTime Between '20120101' and '20121231' and Excuse='特休假'
group by ApplyerDeptName,ApplyName,HR10day
------------------------------------------------------------------------
資料表有dbo.test,dbo.test2(檢視表),afu_form_HR10 謝謝!
------------------------------------------------------------------------

Viewing all articles
Browse latest Browse all 15645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>