• devjdk470
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Interesting behavior with SOQL query.

Here is the setup.

Some_Field__c is a Text length 20.

Some_Field__c is not null

This is proven by running

SELECT Some_Field__c FROM Account  WHERE Id ='0013000000Ik1srAAB'  and Some_Field__c !=null

and it returns the row.

And

SELECT Some_Field__c FROM Account  WHERE Id ='0013000000Ik1srAAB'  and Some_Field__c = null

does not return a row.

The row is an empty string but

SELECT Some_Field__c FROM Account  WHERE Id ='0013000000Ik1srAAB'  and Some_Field__c = ''

doesnt return anything.

Also,

SELECT Some_Field__c FROM Account  WHERE Id ='0013000000Ik1srAAB'  and Some_Field__c = '%'

doesn't return anything.


This is happening on a summer 08 sandbox org.

How do I filter on the empty string?