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
nickname142857nickname142857 

Query question (full outer join)

I have a parent object which has a period field, and a child object that also has a period field. And I want to get all rows that either parent.period = 'Jan' or child.period = 'Jan' (with just one query).

 

I cannot do something like

select ..., (select ..., from child where period = 'Jan') from parent where period = 'Jan'

because it will only return records for which parent.period = 'Jan'.

 

Anyone has any thoughts, suggestions?

NZ_XueNZ_Xue

did u try something like this:

List <List<SObject>> searchList = [ FIND :'Jan' IN period FIELDS RETURNING parent,child)];