+ Start a Discussion
ArjunmcaArjunmca 

How to eleminate blank records while quering

HI,

 

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';

 

Thanks

Arjun.

prady-cmprady-cm

use in your where clause to check for null or spaces

 

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

ArjunmcaArjunmca

Hi,

 

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.