You need to sign in to do that
Don't have an account?
HarishGoudd Buura
Querying Related LIst
Hello,
Please let me we have to query all the contacts records which are not having any related list(child OBJS) ,
We have to delete those contacts,
we have 18 child objects for contact.
Thanks in avdacne
Please let me we have to query all the contacts records which are not having any related list(child OBJS) ,
We have to delete those contacts,
we have 18 child objects for contact.
Thanks in avdacne
SELECT id, name from Contact where id not in (select contactid from Case)
The above is just an example for the Case related list, then you can append all the 18 child objects in the query to find out the contacts which are not having any related list. So it will be like:
SELECT id, name from Contact where id not in (select contactid from Case) and id not in (select contact__c from XXX) and id not in ...
Thanks for your reply and here I'm facing an Error "Maximum 2 semi join sub-selects are allowed"
I can apend more than 2 semi joins here please let me know is there any other way to get the records