select
sum(COALESCE (somme_fac_reg, 0)) - sum( COALESCE (RESTE, 0)) as ECART
from
Solde_View
group by
having sum(COALESCE (somme_fac_reg, 0)) - sum( COALESCE (RESTE, 0)) > -1
and having sum(COALESCE (somme_fac_reg, 0)) - sum( COALESCE (RESTE, 0)) < 1
答案 0 :(得分:-1)
您遇到一些语法错误,请尝试以下操作:
select
sum(COALESCE (somme_fac_reg, 0)) - sum( COALESCE (RESTE, 0)) as ECART
from
Solde_View
WHERE NOT(sum(COALESCE (somme_fac_reg, 0)) - sum( COALESCE (RESTE, 0)) >= -1
and sum(COALESCE (somme_fac_reg, 0)) - sum( COALESCE (RESTE, 0)) <= 1)