You need to sign in to do that
Don't have an account?
Andrew Telford
SOQL Query With WHERE based on Picklist value
Hi
I have a custom object ci_mailout and it has a picklist filed called mailout_name__c. When I create the following query, it tells me that there is an unexpected ';'. From what I can see there isn't anything unexpected. Is it something to do with the picklist??
note that objMailout has been declared earlier (PUBLIC LIST <ci_mailout__c> objMailout;) in the script.
I have a custom object ci_mailout and it has a picklist filed called mailout_name__c. When I create the following query, it tells me that there is an unexpected ';'. From what I can see there isn't anything unexpected. Is it something to do with the picklist??
objMailout = [SELECT Id, contact__c, contact__r.Name, recipient_first_name__c, recipient_last_name__c, caps__r.AccountID__c, file_password__c, email_address__c FROM ci_mailout__c WHERE Sent__c = FALSE, Mailout_name__c = :strTemplate_Initial ORDER BY Policy_count__C Desc LIMIT 250];
note that objMailout has been declared earlier (PUBLIC LIST <ci_mailout__c> objMailout;) in the script.
Best Answer chosen by Andrew Telford
Andrew Telford
Don't worry ... figured out I was being silly in my WHERE clause and added a , insteaf of AND ...