2 Replies Latest reply: Oct 11, 2018 2:43 AM by Paulien van der Krift RSS

    SOQL: two WHERE statements returns empty table

    Paulien van der Krift

      Hi everyone,


      I'm trying to filter a table for both Country (from the related campaign) and CreatedDate. I included this statement:


      WHERE (campaign__r.Country__c = 'Netherlands' OR campaign__r.Country__c = 'Belgium') AND CreatedDate >= 2018-05-01T00:00:00Z

      It returns an empty table. The funny thing is, when I just use the Country filter, it returns a properly filtered table with just records from Netherlands and Belgium. When I just use the CreatedDate filter, it neatly returns a table with only records created on or after the 1st of May. But when I use both, the table is empty. Can anyone help me figure this out?