错误SQL(遇到零除错误)

2020-09-21 03:42发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中) Que tal,我是Podrí...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


Que tal,我是Podríanapoyar Con este查询者,请修改以下内容,否则不会出现错误:

选择
 T0.NOMES,
 T0.SERIESNAME为" SUCURSAL",
 T0.SLPCODE,
 T0.SLPNAME,
 T0.CardCode,
 T0.CardName,
 T1.U_IMPORTE'OBJETIVO MES',
 T1.U_OBJETIVOMU'OBJETIVO MU',
 
 SUM(ISNULL(T0.TOTALSINIVA,0))为'VENTA NETA',SUM(ISNULL(T0.UTILIDAD,0))为'MU',


 SUM(T0.TOTALSINIVA)= 0时的情况,然后0否则


 (SUM(ISNULL(T0.UTILIDAD,0))/SUM(ISNULL(T0.TOTALSINIVA,0)))* 100 END AS'PORCENTAJE MU',


 (SELECT ISNULL(SUM(T5.DOCTOTAL),0)来自OINV T5的'VENCE'


 在T5.CardName = T0.CARDNAME和MONTH(T5.DocDueDate)= T0.NOMES和T5.SlpCode = T0.SLPCODE)为'SI VENCE'的情况下,


 (SELECT ISNULL(SUM(T5.DocTotal)-(SUM(T5.DOCTOTAL)-SUM(PaidToDate)),0)来自OINV T5的'RECUPERADO'


 其中T5.CardName = T0.CARDNAME和MONTH(T5.DocDueDate)= T0.NOMES和T5.SlpCode = T0.SLPCODE)为'SF RECUPERADO'






 从VENTAS_OBJETIVOS T0左加入CONCENTRADO_OBJETIVOS T1开启
 T0.SERIESNAME = T1.U_SUCURSAL和T0.NOMES = T1.U_MES1和T0.SLPCODE = T1.U_IDVENDEDOR
 T0.SERIESNAME <>'SI'
 GROUP BY T0.NOMES,T0.SERIESNAME,T1.U_IMPORTE,T1.U_OBJETIVOMU,T0.SLPCODE,T0.SLPNAME,T0.CardCode,T0.CardName
 按T0.SeriesName,T0.SlpName,T0.CardCode排序
 

1条回答
小熊yu生菜
2020-09-21 04:32

Hola

yocambiaríaesto:

情况为ISNULL(SUM(T0.TOTALSINIVA),0)= 0则为0,否则为空

没有礼貌

奥古斯丁

一周热门 更多>