我有一个访问查询,返回以下记录;
Customer Invoiced The Plan Value Sales
Cust1 22110
Cust2
Cust3 14143 5391
Cust4
Cust5
Cust6
Cust7 341648
Cust8 43910 123309
Cust9 32096 288403
我希望能够运行一个返回客户的查询,其中至少有一个字段是已开票,计划值,销售,而不是返回全部为空白的记录。
我的预期结果是;
Customer Invoiced The Plan Value Sales
Cust1 22110
Cust3 14143 5391
Cust7 341648
Cust8 43910 123309
Cust9 32096 288403
我当前的查询是;
SELECT qry_Final_output.Customer,
qry_Final_output.Invoiced,
qry_Final_output.[The Plan Value],
qry_Final_output.Sales
FROM qry_Final_output;
答案 0 :(得分:1)
使用WHERE
子句并检查字段是否为NULL
:
SELECT qry_Final_output.Customer,
qry_Final_output.Invoiced,
qry_Final_output.[The Plan Value],
qry_Final_output.Sales
FROM qry_Final_output
WHERE qry_Final_output.Invoiced IS NOT NULL
OR qry_Final_output.[The Plan Value] IS NOT NULL
OR qry_Final_output.Sales IS NOT NULL);