You need to sign in to do that
Don't have an account?

Help In System.QueryException: unexpected token: '['
Hi I am using Dynamic query in Apex and I am facing this issue I have my debug logs:
What am I doing wrong?? This is my query string --
10:17:09.075 (75325000)|USER_DEBUG|[86]|DEBUG|******Select Id,Name,Lookup__c from Record__c where Lookup__c IN '[a02i00000012UOvAAM, a02i00000012UOfAAM]'
Like
Lookup__c IN : SetIds
Thanks but WHEN I DO THIS
I GET :
IN operator must be used with an iterable expression this error!!
Create a string using set in format
String ids = '(\'' + id1 + '\',\'' + id2 + '\')'
and then use in query
IN ids
Dont use colon this time
use round bracket instead of square.