Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
SELECT Id, Name, field1__c, field2__c FROM Object1__c WHERE Field_Compare__c = true
Easy way is to create a formula field to do the comparison and set a boolean value.
You can use the formula in your SOQL query.
Your SOQL query will look like this.
Field_Compare__c will be your formula field which returns true (a boolean output) if field1 = field 2, it will return false if field1 <> field2.
Hope this helps.
SELECT Id, Name, field1__c, field2__c FROM Object1__c WHERE field1__c = field2__c;
Use this query and display it in VF Page.
Thanks
Vinuthh S