Skip to main content
I am trying to run a query that has multiple conditions in the WHERE clause. If I reduce it to a single condition by removing two of the other conditions I need, the query works. I have three conditions and I have tried a query with each individual condition. They all work. However, when they are combined using AND, I receive an error. I have tried all different combinations of using parentheses to see if it makes a difference, but no luck. To provide an example, I have replaced the field names,object names, and values with fake names. I am using the developer console's query editor at this time.

Example:

SELECT SUM(CustomField1) FROM CustomObject__c WHERE CustomField1 = 'Value1' AND CustomField2 = 'Value2' AND CustomField3 != 'Value3'

I have referenced the SOQL documentation but no luck. Do you see anything wrong with my query?
9 respuestas
  1. 9 ago 2016, 15:22
    I was correct. I changed the queries to display in ANSI instead of UTF-8 in Notepad. It showed that it was different characters when decoded, but in UTF-8 they displayed the same. Sorry for bluring out field names and values - I beleive my work is propriety.

    I was correct. I changed the queries to display in ANSI instead of UTF-8 in Notepad. It showed that it was different characters when decoded, but in UTF-8 they displayed the same.
0/9000