Hi, I'm using MonetDB over Fedora 15 and the driver monetdb-1.20-jdbc.jar I have problems with the sintaxis of the following function: ----------------------- create function hts.Get_idimage() returns int begin declare idimag int; select max(Imag_id) into idimag from hts.Image; returns idimag+1; end; ----------------------- the error message is: ----------------------- Error: syntax error, unexpected $end, expecting WHILE in: "create function hts.get_idimage() returns int begin declare idimag int;" SQLState: null ErrorCode: 0 Error occured in: create function hts.Get_idimage() returns int begin declare idimag int ----------------------- Can you give me some clues of how to fix this sintaxis error? I've checked the SQL 2003 framework and the script looks fine. Thanks in advance for your help. Enrique.