ResultSet rs2 = null;
try
{
String fetchInitStmt = "SELECT MAX(" + columnName + ") FROM " + tableIdentifier.getFullyQualifiedName(false);
ps2 = sqlControl.getStatementForQuery(conn, fetchInitStmt);
rs2 = sqlControl.executeStatementQuery(conn, fetchInitStmt, ps2);
if (rs2.next())
{
long val = rs2.getLong(1);
addSequence(sequenceName, Long.valueOf(incrementBy + 1 + val), conn);
nextVal = Long.valueOf(1 + val);