Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8430

COMMIT IN Procedure

$
0
0

Hi ,

 

I want to create procedure which need "commit" in loop.

But I got following error.

 

Could not execute 'CREATE PROCEDURE test1 LANGUAGE SQLSCRIPT AS BEGIN DECLARE I DECIMAL (10,0) :=0 ; FOR I IN 1 .. ...' in 1 ms 964 µs .

 

SAP DBTech JDBC: [257] (at 186): sql syntax error: Transaction management statement is not allowed in SQLScript: line 6 col 3 (at pos 186)



Simplified logic is following .
--------------------------------------

CREATEPROCEDUREtest_procLANGUAGESQLSCRIPTAS

BEGIN

DECLAREIDECIMAL(10,0) :=0;

FORIIN1 .. 10000DO

UPDATE TESTTABLESET Col1=Col3WHERE keycol = :I;

  COMMIT;

ENDFOR;

END;

--------------------------------


Looks like it is specification of HANA , but I want to use commit in procedure ...

Any Idea ?


Regards,

JT


Viewing all articles
Browse latest Browse all 8430

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>