You need to sign in to do that
Don't have an account?
Linda 98
Picklist in Soql in batch apex
Hi
Some where i am going wrong and i keep on getting tis error.
I am writing a batch apex and i just want to query opportunities whose stage is not WON.
This is what i had written and it gives me error saying 'execpted semi colon found something or other'
Here is my part of code.Please correct me .I used !=.
I tried using IN,Includes,Exculdes.
But no Luck.
Thank you!
Some where i am going wrong and i keep on getting tis error.
I am writing a batch apex and i just want to query opportunities whose stage is not WON.
This is what i had written and it gives me error saying 'execpted semi colon found something or other'
Here is my part of code.Please correct me .I used !=.
I tried using IN,Includes,Exculdes.
But no Luck.
global Database.QueryLocator start(Database.Batchablecontext BC){ query='select id from Opportunity where stage != 'WON' '; return Database.getQueryLocator(query);
Thank you!
Try the below code
The field is 'StageName'
If you're using dynamic SOQL, you must escape the single quotes: