当前位置: 代码迷 >> 综合 >> SAP HANA Procedure的Odata更新(POST)表操作
  详细解决方案

SAP HANA Procedure的Odata更新(POST)表操作

热度:85   发布时间:2023-12-21 22:33:43.0

试了很久,procedure的odata直接执行貌似没办法更新

只有借用POST才可以更新

procedure的写法如下:

PROCEDURE "DEMO"."matinal.pro::zpro1" (IN  new   "matinal.data::ztable2",OUT error "matinal.data::error"
) LANGUAGE SQLSCRIPTSQL SECURITY INVOKER DEFAULT SCHEMA DEMOAS
BEGIN
/***************************** Write your procedure logic *****************************/select MY_COL1, MY_COL2, MY_COL3 from :new;error = select '0' as ERROR_ID, 'value as empty' as COMMENT from dummy;INSERT INTO "DEMO"."matinal.data::ztable2"(MY_COL1, MY_COL2, MY_COL3) VALUES('1001',1,'test');
END;

Odata的写法如下:

service namespace "ztest" {"matinal.views::zcal1" as "zcal1"create using "matinal.pro::zpro1";
}

借助POST更新即可,否则不会更新。


  相关解决方案