Let's say I have a table that looks like the following:
Table1:
[Name AB Hits]
And I have a query that calculates:
Avg = Hits / AB
But sometimes, the entries in the table have AB = 0.
When I run this query, it outputs an error, how can I make it output 0 for Avg if AB = 0 ?
Similar to the basic statement:
If AB = 0 THEN AVG = 0 ELSE AVG = Hits / AB
Only I imagine this would be in SQL or the design mode of the query. Thanks in advance for any help.
Spow
Table1:
[Name AB Hits]
And I have a query that calculates:
Avg = Hits / AB
But sometimes, the entries in the table have AB = 0.
When I run this query, it outputs an error, how can I make it output 0 for Avg if AB = 0 ?
Similar to the basic statement:
If AB = 0 THEN AVG = 0 ELSE AVG = Hits / AB
Only I imagine this would be in SQL or the design mode of the query. Thanks in advance for any help.
Spow