Regarding the SQL script runner (which I also use), I noticed the following code snippet:
for (int i = 0; i < cols; i++) { String value = rs.getString(i); print(value + "\t"); }
However, the API documentation for the getString (int) method mentioned that indexes start at 1 , so this should become:
for (int i = 1; i <= cols; i++) { String value = rs.getString(i); print(value + "\t"); }
Secondly, this ScriptRunner implementation does not provide support for DELIMITER statements in SQL script, which are important if you need to compile TRIGGERS or PROCEDURES. So I created this modified version of ScriptRunner: http://pastebin.com/ZrUcDjSx , which I hope you find useful.
Pantelis Sopasakis Feb 16 '11 at 9:50 a.m. 2011-02-16 09:50
source share