You need to sign in to do that
Don't have an account?
Amit Visapurkar 5
Using includes in soql
List<AggregateResult> g = [SELECT AVG(A) CurrentM) FROM Customer_Object __c WHERE custom_field INCLUDES (:fleetM) GROUP BY custom_field];
fleetM is a String whose values is like this - 'A','B'
The question is when i use fleetM the query does not return anything however when i use INCLUDES ('A','B' ) it gives correct result.
Can anyone tell me whats the problem. The query is returning correct results when the second approach is used and no result with first appraoch.
fleetM is a String whose values is like this - 'A','B'
The question is when i use fleetM the query does not return anything however when i use INCLUDES ('A','B' ) it gives correct result.
Can anyone tell me whats the problem. The query is returning correct results when the second approach is used and no result with first appraoch.
https://developer.salesforce.com/forums/?id=906F00000008yY9IAI
https://salesforce.stackexchange.com/questions/46196/soql-query-with-multi-select-picklist-in-where-clause (https://salesforce.stackexchange.com/questions/46196/soql-query-with-multi-select-picklist-in-where-clause" target="_blank)
Only when i use
List<AggregateResult> g = [SELECT AVG(A) CurrentM) FROM Customer_Object __c WHERE custom_field INCLUDES (:fleetM) GROUP BY custom_field]; i am not getting the result. Can anybody tell me why this is happening