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

SOQL String Query
Hi,
I am trying to write a String SOQL query in a Batch class. I need to query records with a particular condition as written below:
String Soql = 'SELECT id,StageName FROM Opportunity Where StageName in (\'Quoted\',\'Bound\',\'Working\')' ;
Here StageName is a Picklist field . So I need to query record with above those three picklist values, but this query is not working. Please let me know how to construct a String with this "Where" condition.
Thanks
I am trying to write a String SOQL query in a Batch class. I need to query records with a particular condition as written below:
String Soql = 'SELECT id,StageName FROM Opportunity Where StageName in (\'Quoted\',\'Bound\',\'Working\')' ;
Here StageName is a Picklist field . So I need to query record with above those three picklist values, but this query is not working. Please let me know how to construct a String with this "Where" condition.
Thanks
Try below code: Important :
If this is what you were looking for then please mark it as a "SOLUTION" or You can Click on the "Like" Button if this was beneficial for you.