+ Start a Discussion
krishnagkrishnag 

query mishandled

hi i wrote a query with multiple conditions in it i dont know what s the wrong in it.I ma posting the query in here 

 

 

integer numE = [select count() from Account where  Company_Relationship__c = 'Employee' and Lead_Created_Date__c>=:FromDate AND Lead_Created_Date__c<=:ToDate];

 

 

the above query worked fine until and i added ine more and condition

 

integer numE = [select count() from Account where HelpPoint_Delivered__c = "true" and Company_Relationship__c = 'Employee' and Lead_Created_Date__c>=:FromDate AND Lead_Created_Date__c<=:ToDate];

 

this query is making wrong data .Is there anything limitation like we cannot add these and conditions in a query

 

 

Best Answer chosen by Admin (Salesforce Developers) 
aballardaballard

What is the type of helppoint_delivered__c? Is it a text field?   Otherwise, perhaps the test should be helppoint_delivered__c = true

 

All Answers

aballardaballard

What is the type of helppoint_delivered__c? Is it a text field?   Otherwise, perhaps the test should be helppoint_delivered__c = true

 

This was selected as the best answer
Jeremy_nJeremy_n

Change the double-quotes - " for single-quotes - ' ?

 

Jeremy

krishnagkrishnag

thnaks guys got the soultion helppointdelivered is checkbox so no need of quotes.so foolish iam.