• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

I would like my SQL to return a Zero if a Null is returned

Hello:

I am using the following expression in an Access query to generate a proportion defective

(QNs_LV_FV_qry.[SumOfDefectQty (ext)]/Shipments_FV_qry.SumOfDelivery_Qty)*1000000 AS QN_PPM

Sometimes, however, there are no defects, so the above expression returns a null. I would like it to return a zero in such cases.

Thanks
0
Rex85
Asked:
Rex85
1 Solution
 
SharathData EngineerCommented:
You can try NZ function.

NZ((QNs_LV_FV_qry.[SumOfDefectQty (ext)]/Shipments_FV_qry.SumOfDelivery_Qty)*1000000,0) AS QN_PPM
0
 
Rex85Author Commented:
Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now