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, new Long(incrementBy + 1 + val), conn);
nextVal = new Long(1 + val);