You need to sign in to do that
Don't have an account?
Jeanette Albert 15
Error on SOQL query
I get an error before the AND is the last statement. (Description LIKE '%POI Document%') AND LastModifiedDate"
I changed it to WHERE and nada. It verified at OR but that pulled too many records.
SELECT Id, Name, Body, Description, ContentType FROM Attachment WHERE (Description LIKE '%Envelope%') OR (Description LIKE '%PNL Document%') OR (Description LIKE '%OOS Document%') OR (Description LIKE '%POI Document%') AND LastModifiedDate >= YESTERDAY AND LastModifiedDate < TODAY
There has been an error in the SOQL query: MALFORMED_QUERY: (Description LIKE '%POI Document%') AND LastModifiedDate >= YESTERDAY ^ ERROR at Row:1:Column:219 unexpected token: AND
I changed it to WHERE and nada. It verified at OR but that pulled too many records.
SELECT Id, Name, Body, Description, ContentType FROM Attachment WHERE (Description LIKE '%Envelope%') OR (Description LIKE '%PNL Document%') OR (Description LIKE '%OOS Document%') OR (Description LIKE '%POI Document%') AND LastModifiedDate >= YESTERDAY AND LastModifiedDate < TODAY
There has been an error in the SOQL query: MALFORMED_QUERY: (Description LIKE '%POI Document%') AND LastModifiedDate >= YESTERDAY ^ ERROR at Row:1:Column:219 unexpected token: AND
Try the below query
We have a limitation that we cannot include text area field in where condition of soql query.
And you are using the Description field that is why it raise an error.
Thanks.