CommandStatement cmdStmt = (CommandStatement) statement;
Command command = cmdStmt.getCommand();
ProcessorPlan commandPlan = cmdStmt.getCommand().getProcessorPlan();
if (command.getType() == Command.TYPE_DYNAMIC){
instruction = new ExecDynamicSqlInstruction(parentProcCommand,((DynamicCommand)command), metadata, idGenerator, capFinder );
}else{
instruction = new CreateCursorResultSetInstruction(CreateCursorResultSetInstruction.RS_NAME, commandPlan,
command.getType() == Command.TYPE_INSERT
|| command.getType() == Command.TYPE_UPDATE
|| command.getType() == Command.TYPE_DELETE);