使用输入参数进行SQL查询HANA计算视图

时间:2018-11-05 05:43:43

标签: hana

我需要一些帮助来了解我的hana图形视图没有提取任何数据的原因。

我的SQL过程如下。

CREATE PROCEDURE "CONFIG"."PROC_INVENTORYVALUE"() AS 
BEGIN 
DECLARE V_MONTH NVARCHAR(6); 
DECLARE CURSOR tt_PLANTS FOR SELECT "0SOURSYSTEM","ZPLANT","ZREGION" FROM "_SYS_BIC"."CVD_PLANT" WHERE "ZREGION"!='';
V_MONTH = '201811'; 
FOR CUR_ROW AS tt_PLANTS DO 
SELECT "SourceSystem", "Region", "Plant", "WarehouseNumber", "StorageLocation", "SalesOrderNumber", "SalesOrderStatus" FROM "_SYS_BIC"."CVU_REP_IVR_REPORT" (PLACEHOLDER."$SOURCESYSTEM_1$"=>:CUR_ROW."0SOURSYSTEM", PLACEHOLDER."$CAL_MONTH$"=>:V_MONTH, PLACEHOLDER."$REGION_1$"=>:CUR_ROW."ZREGION", PLACEHOLDER."$PLANT_1$"=>:CUR_ROW."ZPLANT") GROUP BY "SourceSystem", "Region", "Plant", "WarehouseNumber", "StorageLocation", "SalesOrderNumber", "SalesOrderStatus" into "SCHEMA"."TAB_IVR_STG"; 

commit; 

END FOR;
CLOSE tt_PLANTS; 
END;

当我运行该过程时,它将在游标中循环,但是将0条记录插入到表“ TAB_IVR_STG”中。

语法是否有错误或过程中缺少的内容?

非常感谢您的帮助。

致谢

乌马尔·阿卜杜拉

0 个答案:

没有答案