function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dgindydgindy 

SOSQL reducing results

Does any know how to reduce the results of a search on a relationship that's not limit?  I don't need to reduce the number of lines returned. 

Select p.Doctor__c, p.Doctor__r.Name, p.Doctor__r.OwnerId, p.Name, (Select Description, Id From Tasks) from Patient__c p

 

It returns all doctors and any task.  if there is no task it still returns the doctor.  How do i get only doctors with tasks?

 

werewolfwerewolf
That's a tough one.  I don't think you'll be able to do this in a single query.
dgindydgindy

Thanks...I guess i need to submit this request to the Ideas page