sap bo webi中自定义查询中使用if then replace条件的语法

2020-09-11 00:01发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)我正在运行当前脚本,但想添加一个...

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

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


我正在运行当前脚本,但想添加一个if if then条件。

基于从业务对象中一个系统中获取的当前数据的以下类似内容,该机器被命名为" 005",所以我希望它在报告的输出上显示名称" P41205",我认为 如果V_FLUID_SMU_RECORD.MACHINE_N ='005'重命名为" P41205",则命令的谎言应该是。 然后将其添加到下面运行的脚本中。 这样可以代替机器名称吗?

选择V_FLUID_SMU_RECORD.MACHINE_N,V_FLUID_SMU_RECORD.TIMESTAMP,V_FLUID_SMU_RECORD.SMU_Q,V_FLUID_SMU_RECORD.SMU FROM V_FLUID_SMU_RECORD其中V_FLUID_SMU_RECORD.TIMESTAMP TRUNC(SYSDATE-20)和TRUNC(SYSDATE)和V_FLUID_SMU_RECORD.SMU_Q> 2和V_FLUID_SMU_RECORD.MACHINE_N在('之间 144103"," 154114"," 154115"," 154116"," 174672"," 174673"," 174674"," 174675"," 174676"," 184622"," 184623"," 194615"," 194616" ,'204120','204129','224538','224539','304201','304202','304204','304206','304207','304215','304243','304244',' 304245','304246','304247','304248','304249','314264','314265','374276','374278','374279','374281','374282','374283' ," 374284"," 374285"," 005")

10条回答
clever101
2020-09-11 00:49

Mahboob,

我已经编写了这样的脚本,但上面仍然存在FROM错误

选择

当Right(V_FLUID_SMU_RECORD.MACHINE_N,3)='005'时的情况,然后替换(V_FLUID_SMU_RECORD.MACHINE_N,'005','P41205')其他V_FLUID_SMU_RECORD.MACHINE_N结尾为'MACHINE_N',V_FLUID_S.MUSTA V_FLUID_SMU_RECORD.SMU

从V_FLUID_SMU_RECORD

其中TRUNC(sysdate-20)和TRUNC(sysdate)之间的V_FLUID_SMU_RECORD.TIMESTAMP和V_FLUID_SMU_RECORD.SMU_Q> 2

和V_FLUID_SMU_RECORD.MACHINE_N in

('005',

'P41206',

'144102',

'164607',

'174656',

'174657',

'174664',

'174665',

'174667',

'174677',

'194615',

'204120',

'204130',

'204133',

'204145',

'204146',

'204148',

'204149',

'214601',

'214602',

'214603',

'214604',

'214640',

'224534',

'314435',

'314436',

'324446',

'324449',

'344442',

'344480',

'344482',

'344483',

'404152',

'404153',

'404155',

'404156',

'404157',

'404158',

'404409',

'404424',

'404426',

'404439',

'404444',

'404605',

'404609',

'414755',

'414756',

'434751',

'464166',

'564163',

'564164',

'564169')

一周热门 更多>