Hi John,
johnsmith wrote:
select * from t1 where (f1 + f2) > 1
This should work (assuming you are using Adapter):
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(
new FieldCompareValuePredicate(new EntityField2("FieldSum",
new Expression(SalesOrderFields.Freight, ExOp.Add, SalesOrderFields.SubTotal)),
null, ComparisonOperator.GreaterThan, 1));
For more info, consult the manual (Using the generated code -> (Adapter | SelfServicing) -> Filtering and Sorting).
johnsmith wrote:
or better still:
select * from t1 where (isnull(f1, 0) + isnull(f2, 0)) > 1
Unfortunately DBFuncionCall was implemented in v2.0. You could try this workaround: http://llblgen.com/tinyforum/Messages.aspx?ThreadID=7492&StartAtMessage=0얉