Well, of course you need to adapt it to your code reality. Either way, this is what it would look like:
[...] var pstmt = conn.prepareStatement("INSERT INTO \"SYSTEM\".\"LOOPS\" VALUES (?)"); for (i = 1; i < 100; i++) { pstmt.setInteger(1,i); pstmt.execute(); } [...]
Using the hdb namespace you could have the following:
[...] var strQuery = "INSERT INTO \"SYSTEM\".\"LOOPS\" VALUES (?)"; var conn = $.hdb.getConnection(); var i = 1; for (i = 1; i < 100; i++) { conn.executeUpdate(strQuery,i); } conn.commit(); [...]
Get familiar with the XS JS API here: JSDoc: Index
One last thing: "LOOP" is a SQL reserved word in HANA. Not sure how (or if) you managed to use it as a table. Anyhow: don't use it.
BRs,
Lucas de Oliveira