我对一段SQL代码有点问题。每当我尝试从此数据库导出到Excel时,我得到与日期相关的3075语法错误。从我所看到的,它与解释的结束日期是<比起始日期,出口不到一天。
为了澄清,我确实很好地了解了大多数3075个问题,但无法就此达成一致。 我没有任何SQL经验,也很感激任何人对此的投入。
以下是代码:
strSql = "SELECT Min([Breaches and Errors Log].[Date Incident Reported]) AS [MinOfDate Incident Reported], Min([Breaches and Errors Log].[Date Incident Identified]) AS [MinOfDate Incident Identified], Min([Breaches and Errors Log].[Date Incident Commenced]) AS [MinOfDate Incident Commenced], Min([Breaches and Errors Log].[Date Incident Rectified]) AS [MinOfDate Incident Rectified], " & _
" Max([Breaches and Errors Log].[Date Incident Reported]) AS [MaxOfDate Incident Reported], Max([Breaches and Errors Log].[Date Incident Identified]) AS [MaxOfDate Incident Identified], Max([Breaches and Errors Log].[Date Incident Commenced]) AS [MaxOfDate Incident Commenced], Max([Breaches and Errors Log].[Date Incident Rectified]) AS [MaxOfDate Incident Rectified] FROM [Breaches and Errors Log]"
这是我得到的错误: