function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sumesh ChandranSumesh Chandran 

Select condition with 'where' and 'and' clause not working

Select Name, CloseDate, StageName, sumchans__OppOwner__c From Opportunity where CloseDate < YESTERDAY and StageName = 'Overdue' and StageName = 'Won'

This is exaclty what I am trying to do, but it doesn't pull any data. I know there is something wrong here.

Please advise!
Best Answer chosen by Sumesh Chandran
Raj VakatiRaj Vakati

Select Name, CloseDate, StageName, sumchans__OppOwner__c From Opportunity where CloseDate < YESTERDAY and (StageName = 'Overdue' OR StageName = Closed 'Won' )

All Answers

Raj VakatiRaj Vakati

Select Name, CloseDate, StageName, sumchans__OppOwner__c From Opportunity where CloseDate < YESTERDAY and (StageName = 'Overdue' OR StageName = Closed 'Won' )
This was selected as the best answer
Sumesh ChandranSumesh Chandran
Thanks Raj,

Was that easy, That worked.