PredicateExpression using table Field as compare

Posts   
 
    
Anthony
User
Posts: 155
Joined: 04-Oct-2006
# Posted on: 30-Apr-2008 01:43:37   

wish to create sql

SELECT * FROM TABLE WHERE DateModified<LastSync

How do i implement the WHERE cluase?

Will this work?

bucket.PredicateExpression.Add(New FieldCompareValuePredicate(ClientAccountFields.DateModified, Nothing, ComparisonOperator.GreaterThan, ClientAccountFields.LastSync))

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 30-Apr-2008 11:26:31   

You should be using FieldCompareExpressionPredicate

Ref: manual's section Using the generated code -> Adapter/SelfServicing -> Filtering and Sorting -> The predicate system