Mike Hughes
Registered User.
- Local time
- Today, 19:04
- Joined
- Mar 23, 2002
- Messages
- 493
I have the query below and keep getting "Division by Zero" error when I run it.
I'm looking for the percent of CURRENT PAID to the CURRENT DUE. There is one CASELOAD which has "0" CURRENT DUE AND "0" CURRENT PAID and I believe that might be what is causing the problem.
Can someone point me in the right direction? Thanks
SELECT
[14 TABLE].CASELOAD,
[14 TABLE].[CURR DUE],
[14 TABLE].[CURR PAID],
[14 TABLE].[ARR PAID],
SUM ([14 TABLE].[CURR PAID]/[14 TABLE].[CURR DUE]) AS [PERCENT PAID]
FROM [14 TABLE]
GROUP BY
[14 TABLE].CASELOAD,
[14 TABLE].[CURR DUE],
[14 TABLE].[CURR PAID],
[14 TABLE].[ARR PAID]
I'm looking for the percent of CURRENT PAID to the CURRENT DUE. There is one CASELOAD which has "0" CURRENT DUE AND "0" CURRENT PAID and I believe that might be what is causing the problem.
Can someone point me in the right direction? Thanks
SELECT
[14 TABLE].CASELOAD,
[14 TABLE].[CURR DUE],
[14 TABLE].[CURR PAID],
[14 TABLE].[ARR PAID],
SUM ([14 TABLE].[CURR PAID]/[14 TABLE].[CURR DUE]) AS [PERCENT PAID]
FROM [14 TABLE]
GROUP BY
[14 TABLE].CASELOAD,
[14 TABLE].[CURR DUE],
[14 TABLE].[CURR PAID],
[14 TABLE].[ARR PAID]