Fix for issue n. 718

I've run all the tests (including commercial DBs) and they are all passing.
I've introduced a new test for SQLServer that reproduces the fixed issue (n.718) and that fails without my fix in the JdbcTemplate class.