StatementContext statementContext = null;
//now construct the delete where current of sql
try {
StringBuffer deleteWhereCurrentOfSQL = new StringBuffer("DELETE FROM ");
CursorActivation activation = lcc.lookupCursorActivation(getCursorName());
deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get the underlying (schema.)table name
//using quotes around the cursor name to preserve case sensitivity
deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF " +
IdUtil.normalToDelimited(getCursorName()));