IE SCRIPT5008:对齐中的左侧无效

时间:2017-02-10 00:37:19

标签: javascript

公平地说,我将其复制并粘贴到一个数组中并且除了在IE中以外都可以工作我得到这个错误:SCRIPT5008:赋值中的左侧无效(116,5)。指向此行SELECT PO.ID_PROD_ORDER, J.ID_ASSET, SUM(C.QT_CONF) AS "QT_CONF", SUM(C.QT_SCRAP) AS "QT_SCRAP", MIN(J.DT_JOB_ST) AS "START_DATE", MAX(J.DT_JOB_ED) AS "END_DATE", (SELECT SUM(datediff(ss, D.DT_START, D.DT_END)) AS "DOWNTIMESECONDS" FROM DOWNTIME D INNER JOIN SUB_ASSET SA ON D.ID_SUB_ASSET = SA.ID_SUB_ASSET WHERE SA.ID_ASSET = [Param.3] AND D.DT_START >= MIN(J.DT_JOB_ST) AND D.DT_END <= MAX(J.DT_JOB_ED)) FROM PROD_ORDER PO INNER JOIN JOB J ON PO.ID_PROD_ORDER = J.ID_PROD_ORDER AND J.DT_JOB_ST >= '[Param.1]' AND J.DT_JOB_ED <= '[Param.2]' LEFT OUTER JOIN CONFIRMATION C ON C.ID_JOB = J.ID_JOB WHERE J.ID_ASSET = [Param.3] GROUP BY PO.ID_PROD_ORDER, J.ID_ASSET

Private Sub showQueryData()

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim sqlStr As String

sqlStr = "SELECT COUNT(CalculatedField) AS TotalNumber FROM table1 AS tbl WHERE CalculatedField = '2'"

Set db = CurrentDb
Set rs = db.OpenRecordset(sqlStr)

Dim result As String
result = rs!TotalNumber

End Sub

1 个答案:

答案 0 :(得分:2)

此功能正在使用一些增强的ES-Next功能,某些浏览器可能还没有实现ES-Next的所有功能..

如果你得到这样的代码,你可以使用babel来编译它。 对于这么小的功能,你甚至可以使用babel.io网站查看它编译的内容,所以例如这里是通过babel编译的这个函数..

function shuffle(a) {
  for (var i = a.length; i; i--) {
    var j = Math.floor(Math.random() * i);
    var _ref = [a[j], a[i - 1]];
    a[i - 1] = _ref[0];
    a[j] = _ref[1];
  }
}