ssmith 29602 (5/10/2013)
Sorry, here the the complete statementSelect
oppo_opportunityref
,oppo_stage
,oppo_closed
From
Opportunity
Where
Case Oppo_stage When 'Bus_Written' Then (oppo_closed is null or Oppo_Closed >= GETDATE() -7)
Basically I'm trying to find all the Bus_Written opportunities where the closed date field is either null of within the last 7 days.
Give this a shot:
Select
oppo_opportunityref
,oppo_stage
,oppo_closed
From
Opportunity
Where
Oppo_stage = 'Bus_Written'
AND (oppo_closed is null or Oppo_Closed >= GETDATE() -7)