SELECT ht_flxz.*, IIf(nz([ysje],0)<>0,[ysje],DSum("ysje","ht_flxz","flbh like '" & [flbh] & "*' and len(flbh)=7")) AS Sumysje
FROM ht_flxz
ORDER BY ht_flxz.flbh;
todaynew 发表于 2011-10-27 19:22
SELECT ht_flxz.*, IIf(nz([ysje],0)0,[ysje],DSum("ysje","ht_flxz","flbh like '" & [flbh] & "*' an ...
谢谢你!~~~
但有个问题让我纳闷了!
我用ASP网页代码读取表时,提示这样的错误~
Microsoft OLE DB Provider for ODBC Drivers '80040e14'
[Microsoft][ODBC Microsoft Access Driver] 表达式中 'nz' 函数未定义。
\htxt\xxx.asp, line 8
ASP网页代码为
<%
dim conn
dim connstr
connstr="DBQ="+server.mappath("../data.mdb")+";DefaultDir=;DRIVER={Driver do Microsoft Access (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
set rs=server.createobject("adodb.recordset")
rs.open "select * from ht_flxz_aa",conn,1,3
Do Until rs.EOF
Response.Write rs("flxz")&"<br/>"
rs.MoveNext
Loop
response.write rs
rs.close
conn.close
set rs=nothing
set con=nothing
%>
是什么原因呢?