标签:values sele varchar reads ati RoCE procedure where nbsp
1.Orchestration Logic
示例:orchestrationProc
CREATE PROCEDURE orchestrationProc LANGUAGE SQLSCRIPT READS SQL DATA AS BEGIN DECLARE v_id BIGINT; DECLARE v_name VARCHAR(30); DECLARE v_pmnt BIGINT; DECLARE v_msg VARCHAR(200);
DECLARE CURSOR c_cursor1 (p_payment BIGINT) FOR SELECT id, name, payment FROM control_tab WHERE payment > :p_payment ORDER BY id ASC;
OPEN c_cursor1(250000); FETCH c_cursor1 INTO v_id, v_name, v_pmnt; v_msg = :v_name || ‘ (id ‘ || :v_id || ‘) earns ‘ || :v_pmnt || ‘ $.‘; CALL ins_msg_proc(:v_msg); CLOSE c_cursor1; END
procedure :ins_msg_proc
--创建message表 CREATE TABLE message_box (p_msg VARCHAR(200), tstamp TIMESTAMP); --创办procedure CREATE PROCEDURE ins_msg_proc (p_msg VARCHAR(200)) LANGUAGE SQLSCRIPT AS BEGIN INSERT INTO message_box VALUES (:p_msg, CURRENT_TIMESTAMP); END;
HANA SQL Script学习(1):Orchestration Logic
标签:values sele varchar reads ati RoCE procedure where nbsp
原文地址:https://www.cnblogs.com/tangToms/p/14053729.html