You need to sign in to do that
Don't have an account?

SOQL Query Assistance, multiple Where
I am obviously missing something obvious, but this query just doesn't work, and i can't work out why, can somebody assist?
SELECT Id,Name,Amount,R2_Job_Ref__c,R2_Shipping_Post_Code__c,Shipping_Postcode_2__c
FROM Opportunity
WHERE Shipping_Postcode_2__c != R2_Shipping_Post_Code__c AND R2_Shipping_Post_Code__c != null
Thanks!
Gareth
In your where clause you cannot compare to a field value in the object.
So in your case Shipping_Postcode_2__c != R2_Shipping_Post_Code__c wont work .
First retrieve the results and use if condition to filter out the results.
Ah i see, that's rather annyoing and inefficient.
But thanks for the reply, will stop banging my head aginst it and add another if loop :)
Cheers
Gareth