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

How to eleminate blank records while quering



There is possibility to have blank values for a column in one of the object.

I am want to write a query to eliminate blank records.


I tried with distinct, but it doest work.  I know distinct is for eliminating duplicate records.

select dintinct(comments__c) from CsoObject__c where Product = 'Card';





use in your where clause to check for null or spaces


SELECT AccountSource FROM Account where (billingcity != null or billingcity ='')




Thanks for you reply. I tried with

billingcity != null

billingcity !=' '

But it doesn't work.   I got the error as 'billingcity' can not be filtered in query call

Could you please let me know how to solve this issue.