return "SELECT OtherTable.MyIndex, RefIndex, Company FROM MySchema.OtherTable, MySchema.MyTable WHERE RefIndex=MyTable.MyIndex(+) AND OtherTable.MyIndex=?";
}
public void testConnectByPrior() {
Table table = getBasicTable();
OraSelectStatement selectStatement = (OraSelectStatement) table.getSelectStatement();
SelectTableReference ref = selectStatement.getSelectTableReference();
CombinedConstraint startWith = selectStatement.getStartWith();
BooleanConstraint bc = startWith.createEQ();
bc.addPart(ref.newColumnReference("MyIndex"));
bc.addPart(1);
CombinedConstraint connectByPrior = selectStatement.getConnectByPrior();
bc = connectByPrior.createEQ();
bc.addPart(ref.newColumnReference("MyIndex"));
bc.addPart(ref.newColumnReference("MyName"));
SQLGenerator gen = getSQLGenerator();
String query = gen.getQuery(selectStatement);