我有一个 SQL 查询,我需要将DATE
列DATETIME
从 Access 数据库转换为的位置。
要转换的列是:
CHECKINOUT.CHECKTIME
CHECKINOUT.DefaultIn
CHECKINOUT.DefaultOut
这是我的查询:
SELECT
USERINFO.NAME, USERINFO.EmployeeCode, CHECKINOUT.CHECKTYPE,
CHECKINOUT.DefaultIn, CHECKINOUT.DefaultOut, CHECKINOUT.DefaultBreckIn,
CHECKINOUT.DefaultBreakOut, CHECKINOUT.CHECKTIME, USERINFO.TITLE
FROM
(CHECKINOUT
INNER JOIN USERINFO ON CHECKINOUT.USERID = USERINFO.USERID)
WHERE
(CHECKINOUT.CHECKTIME >= ?)
AND (CHECKINOUT.CHECKTIME <= ?)
AND (CHECKINOUT.USERID = ? OR ? = - 1)
AND (CHECKINOUT.DefaultIn <= CHECKINOUT.CHECKTIME OR
CHECKINOUT.DefaultOut >= CHECKINOUT.CHECKTIME )
最好的方法是什么?
谢谢