INSERT INTO Tab_Checksum ([name],checkdate,startclass,finishclass,later,absenteeism,early,normal)
SELECT [name],
checkdate,
SUM(startclass) startclass,
SUM(finishclass) finishclass,
SUM(later) later,
SUM(absenteeism) absenteeism,
SUM(startclass)+SUM(later)-SUM(finishclass) early,
SUM(finishclass)-SUM(later)
FROM Tab_Check
where Tab_Checksum.checkdate != Tab_check.checkdate//錯誤行
GROUP BY [name],checkdate
ORDER BY [name],checkdate
錯誤 無法綁定由多個部分組成的標識符 "Tab_Checksum.checkdate"。
你這是Insert語句,select中Tab_Checksum.checkdate != Tab_check.checkdate是不對的,訪問不到Tab_Checksum表