Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

SOQL: two WHERE statements returns empty table

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?

2 Replies
petter
Partner - Champion III
Partner - Champion III

You have a double quote where you should have a single quote for Netherlands....

Anonymous
Not applicable
Author

Woops, edited the post. I don't actually have the double quotes in the code.