You need to sign in to do that
Don't have an account?
Sudiptaa Ghosh
MINUS operator in SOQL
Can somebody pls tell how to do MINUS in SOQL queries:
Like in SQL:
SELECT supplier_id, supplier_name FROM suppliers WHERE supplier_id > 2000 MINUS SELECT company_id, company_name FROM companies WHERE company_id > 1000 ORDER BY 2;
Greetings to you!
You can use NOT IN keyword in SOQL.
NOT IN: If the value does not equal any of the specified values in a WHERE clause.
Please refer to the below link which might help you further.
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_comparisonoperators.htm
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas