How can I get a list of records where two fields have the same or different values using SOQL?

1. Create a formula field

IF(Field1__c != Field2__c, 1, 0)

2. Write a SOQL as mentioned below

SELECT Id from Account WHERE FormulaField__c = 1


No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit