Hi John,

I'm not sure ExpressionFactory can help out, but this should do the trick:

        Expression    expression     =
Expression.fromString("firstAttribute < secondAttribute");
        SelectQuery   query          = new SelectQuery(MyTable.class,
expression);

        context.performQuery(query);

mrg


On Tue, Aug 30, 2011 at 10:43 AM, John Huss <[email protected]> wrote:
> How do I create an Expression (qualifier) that will generate SQL that will
> compare two attributes of the same row, perhaps with a "less than"
> comparison.  For example:
>
> SELECT * FROM MyTable t
> WHERE t.firstAttribute < t.secondAttribute
>
> Thanks,
> John
>

Reply via email to