query.setSelect(new Select(Arrays.asList(new Object[] {new ExpressionSymbol("expr", new Constant(new Integer(1)))}))); //$NON-NLS-1$
CommandStatement commandStmt = new CommandStatement(query);
CompareCriteria criteria = new CompareCriteria(new ElementSymbol("x"), CompareCriteria.GT, new Constant(new Integer(1))); //$NON-NLS-1$
Block block = new Block();
block.addStatement(commandStmt);
IfStatement ifStmt = new IfStatement(criteria, block);
IfStatement ifStmt1 = (IfStatement)ifStmt.clone();
Block block2 = new Block();
block2.addStatement(commandStmt);
ifStmt1.setElseBlock(block2);
Block block3 = new Block();
block3.addStatement(ifStmt);
block3.addStatement(ifStmt1);
CreateUpdateProcedureCommand command = new CreateUpdateProcedureCommand(block3);