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
thintonthinton 

problem with "OR" statement

Hi,
 
I am having a very strange problem. I am querying for Contacts for a list of Account Id's. Here are the snippits of code:
 
(I replaced the list of fields for '*' for readability purposes)

SELECT * FROM Contact WHERE (AccountId = '')
      - returns 5 contacts

SELECT * FROM Contact WHERE (AccountId = '00130000007rnTzAAI')
      - returns 2 contacts    

SELECT * FROM Contact WHERE (AccountId = '' OR AccountId = '00130000007rnTzAAI')
      - returns 2 contacts

This problem only arises when one of the two OR statements is AccountId = ''. When I OR two statements and they both have Ids, it works just fine.

Message Edited by thinton on 06-02-2006 07:45 AM

Message Edited by thinton on 06-02-2006 07:45 AM

SuperfellSuperfell
mmm, yeah, that's a bug (for reference #94551)
thintonthinton
oh, ok, thanks.