You need to sign in to do that
Don't have an account?
Abhishek Singh 88
how to filter SOQL query
Hi developer,
I have a doubt regarding to filtering the SOQL query.
I have a three set of id's that is:
Set<id> source;
Set<id>destination;
Set<id> sharedserver;(contains id of source and destination as well)
I have wrote query
but its not giving exact output. Can anyone help me out?
Thanks.
I have a doubt regarding to filtering the SOQL query.
I have a three set of id's that is:
Set<id> source;
Set<id>destination;
Set<id> sharedserver;(contains id of source and destination as well)
I have wrote query
baselist=[select id ,name from base element where id in:sharedserver And( not in:source And not in: destination)]
but its not giving exact output. Can anyone help me out?
Thanks.
When you add NOT condition in SOQL, it has a negative impact on the performance of the SOQL. I would suggest you to create another set which will have the values of sharedServer minus source minus destination and use that set in your SOQL. Below is the sample code on how to code it.