我想保护以下语句免受被零除错误的影响。我怎样才能做到这一点?
SELECT [MyColumn] = sum(
case when v.Process_FundingDt
between @begDt and @endDt
and v.Loan_Purpose_Desc = 'PURCHASE'
then v.Loan_LoanAmt
else 0
end
) / sum (
case when v.Process_FundingDt
between @begDt and @endDt
then v.Loan_LoanAmt else 0
end
)