S
Sonya
I'm trying to find the average of a row of values. To do
so, I am trying the following SQL code:
select (ifnull(COLA,0)+ifnull(COLB,0)+ifnull(COLC,0)) as
NUMERATOR
and
(if(COLA is NULL,0,1) + if(COLB is NULL,0,1) + if(COLC is
NULL,0,1)) as DENOMINATOR
and divide the two. However, i get a syntax error, so I'm
assuming that access does not support "if" in it's SQL.
Does anyone know if access supports "if" ? If they don't,
does anyone have any work arounds to suggest?
I can't use the avg() function because x + NULL = NULL
so, I am trying the following SQL code:
select (ifnull(COLA,0)+ifnull(COLB,0)+ifnull(COLC,0)) as
NUMERATOR
and
(if(COLA is NULL,0,1) + if(COLB is NULL,0,1) + if(COLC is
NULL,0,1)) as DENOMINATOR
and divide the two. However, i get a syntax error, so I'm
assuming that access does not support "if" in it's SQL.
Does anyone know if access supports "if" ? If they don't,
does anyone have any work arounds to suggest?
I can't use the avg() function because x + NULL = NULL