block.addStatement(dStmt);
block.addStatement(loopStmt);
CommandStatement cmdStmt = new CommandStatement(query);
block.addStatement(cmdStmt);
CreateUpdateProcedureCommand virtualProcedureCommand = new CreateUpdateProcedureCommand();
virtualProcedureCommand.setBlock(block);
virtualProcedureCommand.setUpdateProcedure(false);
helpTest("CREATE VIRTUAL PROCEDURE BEGIN DECLARE integer x; LOOP ON (SELECT c1, c2 FROM m.g) AS mycursor BEGIN x=mycursor.c1; IF(x > 5) BEGIN CONTINUE; END END SELECT c1, c2 FROM m.g; END", //$NON-NLS-1$
"CREATE VIRTUAL PROCEDURE\nBEGIN\nDECLARE integer x;\n" //$NON-NLS-1$
+ "LOOP ON (SELECT c1, c2 FROM m.g) AS mycursor\nBEGIN\n" //$NON-NLS-1$
+ "x = mycursor.c1;\nIF(x > 5)\nBEGIN\nCONTINUE;\nEND\nEND\n" //$NON-NLS-1$