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
Sailor67Sailor67 

Query help for: Account, Asset, Contact

I am running this parent-child query:

 

SELECT Id, Name,

   (SELECT Id, Name, Description FROM Assets),

   (SELECT Id, Name, Email FROM Contacts)

FROM Account 

 

How to I exclude resulting records with let say Email=null AND/OR Description=null ?

 

Thanks

/Lars 

 

Nazeer AhamedNazeer Ahamed

Select a.Name, a.Id, (Select Id, Name, Email From Contacts where email = NULL), (Select Id, Name, Description From Assets where Description != NULL) From Account a

 

But you cannot check Description != NULL as Description is Long Text Area (32000).

 

Hope this helps.