此外,如果您的表位于SQL Server或Oracle中,则使用Nz()将迫使更多查询在本地执行,从而对性能产生巨大影响.I have this query in VB application on Access DB: SELECT DISTINCT Specialization, MAX(a.faultZone) AS faultZone, ISNULL(a.faultCount, 0) AS NoOfFaults FROM Technicians AS t LEFT JOIN ( SELECT DISTINCT Faults.[Type] AS faultType, MAX(Faults.[Zone]) AS faultZone, COUNT(Faults.[Type]) AS faultCount FROM Faults " WHERE Faults.[Zone] = 8 " ' this value will be from variable GROUP BY Faults.[Type] " ) AS a ON (t.Specialization = a.faultType) WHERE t.specialization <> 'None' " GROUP BY a.faultCount, t.Specialization It gives following problem that I can't solve...What I want to achieve is simply set value of NoOFFaults to zero, which would mean there are no faults in particular Zone.Thank You 解决方案 Just to add my two cents, and while I like the simple syntax of Nz(), if you seek trouble free performance, both IsNull() and NZ() should be avoided in favor of Is Null: IIF(a.faultCount Is Null, 0, a.faultCount). See the excellent explanation here: http://allenbrowne.com/QueryPerfIssue.htmlAlso, if your tables are in SQL Server or Oracle, using Nz() will force more of the query to be executed locally, with a HUGE performance impact. 这篇关于Access DB上的SQL ISNULL()参数数量错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-20 08:58