I'm trying to form a query in SOQL.
In scheduler ..
sch.accountdList = AccList; sch.query = 'SELECT id from Account where ID IN :'; Database.executeBatch(sch,200);
and in Batch start..
query=query+AccList; return Database.getQueryLocator(query);
This gives me this error
Only variable references are allowed in dynamic SOQL/SOSL
So I tried to avoid ":"
In scheduler again..
sch.accountdList = AccList; sch.query = 'SELECT id from Account where ID IN /'';
I get this error:
mismatched character 'EOF' expecting
How should I form the query? Where am I going wrong?
Thanks in advance!