我正在尝试获取一列的值的总和,因为我在我的选择语句中使用了 SUM() 。
<%
            sql = "select SUM(OpcCalEstQuantity) as qt_total from [Sheet1$] where cInt(JobEstimateNumber) = '"&cint(request.QueryString("no"))&"' and MccDescription = 'CTP Plate Making & Plates' and MaoOperationDescription = 'Plate Making'"
            rs1.open sql, con, 1, 2
            do while not rs1.eof
            %>
            <td style="padding:3px; text-align:right;"><%=rs1("qt_total")%></td>
            <%
                rs1.movenext
                loop
                rs1.close
            %>
但是在浏览器上显示它时出现此错误。
Microsoft JET Database Engine error '80040e14'
Invalid use of Null 
所以我认为解决方法是使用 vbscript 来计算值。但是没有这样的函数来计算列中的值。