cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi All,

while executing the query am getting an error divide by zero error.

Please provide solution.

select t0.DocEntry,t0.DocDate,t0.cardcode,t0.CardName, (T0.[GrosProfit]/(T0.[DocTotal] - T0.[VatSum])*100) As 'GrossProfit%',convert(int,t0.u_udf_quant) as Quant, t0.GrosProfit, (t0.DocTotal-t0.VatSum) as value from ORDR t0 where t0.DocDate between '06-01-2017' and '06-12-2017' and t0.CANCELED='N' order by (T0.[GrosProfit]/(T0.[DocTotal] - T0.[VatSum])*100) Desc

Thanks

Vinoth

0 Likes
View Entire Topic
former_member229757
Participant
0 Likes

Hi Diego,

Thanks its working fine.