在我的项目中,我必须将我的数据库从 SQL Server 2005 更改为 MS Access。但是某些查询无法与 MS Access 一起正常工作。任何人都可以将以下查询从 sql 转换为 MS Access
SELECT l.id,
REPLACE(SUBSTRING(CONVERT(VARCHAR(20), l.app_date, 13), 1, 11), ' ', '/') AS app_date,
l.reason,
REPLACE(SUBSTRING(CONVERT(VARCHAR(20), l.fromdate, 13), 1, 11), ' ', '/') AS fromdate,
REPLACE(SUBSTRING(CONVERT(VARCHAR(20), l.todate, 13), 1, 11), ' ', '/') AS todate,
lt.LeaveDesc,
l.noofdays,
e.Abbv_name,
e1.Abbv_name AS Expr1,
l.Typeofleave AS Leave_ID
FROM leave AS l
INNER JOIN LeaveTypes AS lt
ON l.Typeofleave = lt.TypeofLeave
LEFT JOIN Employee AS e1
ON l.HRby = e1.Emp_id
LEFT JOIN Employee AS e
ON l.approveby = e.Emp_id
WHERE l.submitby = 2
AND submit = 'Y'
AND approved IS NULL
在上面的查询中,离开是我的数据库表。在此先感谢...