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

SOQL error in Winter '10
I'm getting a new error in Winter '10.
"Implementation restriction: expression binding is not
allowed in the SELECT list of a batch query"
I started getting this error when we moved to a Winter '10 sandbox. The SOQL in question looks something like this:
select r.id from referral__c r where...
Note the "r" alias for referral__c.
This query is used to instantiate a StandardSetController. Other queries (not associated with a StandardSetController) with the alias notation work fine.
Removing the alias solves the problem.
ManDarMan2
Just discovered our exception handling in this area is non-deterministic. Can you give us a repro case so that we can narrow it down. Our apologies for the run around. Greg
I am also seeing this error being raised by a custom controller that is deployed by a package that I have created. I get the error in a configuration-only sandbox, but not in the production org that has the exact same package installed. While the error doesn't give me an exact line number, I suspect it is failing when try to instantiate a StandardSetController with a record set generated by the Database.getQueryLocator call with a query that looks something like:
SELECT t.Id, t.Name, t.Whatever FROM CustomType t WHERE t.Whatever = something
This is not a Winter '10 sandbox. It is a config-only sandbox that was created on 8/31/09. I just noticed this error today. Not sure if it was happening earlier.
I was able to work around this issue by removing the alias from my SOQL query. I didn't need it anyway, since my query was unambiguous.