G
Geel
Hello, my access (form/table/query/report) system is completely working
and in it's testing phase, in this phase i ran into the dividing by 0
problem, wich a lot of you knows of aswell. There is a lot to read on
this subject, and i found out there are 2 capeable solutions. The IFF
statement, tried but didn't work for me, and the CASE wich I havn't
gotten to work either. I dunnot know if it's just me, or me? Since this
should be working but it isn't.
SELECT Contract_savings.Savings_ID, Contract_savings.Contract_ID,
Contract_savings.Opco_ID, (CASE [BenefitsTOSperiode].[SAVtotal] WHEN 0
THEN NULL ELSE [BenefitsTOSperiode].[SAVtotal] /
[BenefitsTOperiode].PVtotal END)* 100.00) AS SumOfPVSum
FROM BenefitsTOperiode INNER JOIN (BenefitsTOSperiode INNER JOIN
Contract_savings ON (BenefitsTOSperiode.Opco_ID =
Contract_savings.Opco_ID) AND (BenefitsTOSperiode.Contract_ID =
Contract_savings.Contract_ID)) ON (BenefitsTOperiode.Opco_ID =
Contract_savings.Opco_ID) AND (BenefitsTOperiode.Contract_ID =
Contract_savings.Contract_ID)
GROUP BY Contract_savings.Savings_ID, Contract_savings.Contract_ID,
Contract_savings.Opco_ID;
error: Syntax error (missing operator) in query expression '(CASE
[BenefitsTOSperiode].[SAVtotal] WHEN 0
THEN NULL ELSE [BenefitsTOSperiode].[SAVtotal] /
[BenefitsTOperiode].PVtotal END)* 100.00)'.
Any ideas are very appreciated, trying to finish up my student intern
task and get a good degree
and in it's testing phase, in this phase i ran into the dividing by 0
problem, wich a lot of you knows of aswell. There is a lot to read on
this subject, and i found out there are 2 capeable solutions. The IFF
statement, tried but didn't work for me, and the CASE wich I havn't
gotten to work either. I dunnot know if it's just me, or me? Since this
should be working but it isn't.
SELECT Contract_savings.Savings_ID, Contract_savings.Contract_ID,
Contract_savings.Opco_ID, (CASE [BenefitsTOSperiode].[SAVtotal] WHEN 0
THEN NULL ELSE [BenefitsTOSperiode].[SAVtotal] /
[BenefitsTOperiode].PVtotal END)* 100.00) AS SumOfPVSum
FROM BenefitsTOperiode INNER JOIN (BenefitsTOSperiode INNER JOIN
Contract_savings ON (BenefitsTOSperiode.Opco_ID =
Contract_savings.Opco_ID) AND (BenefitsTOSperiode.Contract_ID =
Contract_savings.Contract_ID)) ON (BenefitsTOperiode.Opco_ID =
Contract_savings.Opco_ID) AND (BenefitsTOperiode.Contract_ID =
Contract_savings.Contract_ID)
GROUP BY Contract_savings.Savings_ID, Contract_savings.Contract_ID,
Contract_savings.Opco_ID;
error: Syntax error (missing operator) in query expression '(CASE
[BenefitsTOSperiode].[SAVtotal] WHEN 0
THEN NULL ELSE [BenefitsTOSperiode].[SAVtotal] /
[BenefitsTOperiode].PVtotal END)* 100.00)'.
Any ideas are very appreciated, trying to finish up my student intern
task and get a good degree