Avoid Derby's limit of "complexity", when parsing SQL statements