skip to Main Content

Mysql – How do I use a WHERE clause on a user-defined variable from a CASE WHEN?

SELECT #Opportunity Details o.Id AS 'Opportunity ID', o.Name As 'Opportunity', o.Project_Assigned__c AS 'PM Assign Date', CASE WHEN o.StageName IN ('Best Case','Commit','Committed','Discover and Assess','Pipeline','Probable','Sales Qualification','Upside') THEN 'Pre-Sales' WHEN o.StageName IN ('Omit - Closed','Omit from Forecast','Omit-Closed','Omitted') THEN 'Omit' WHEN o.StageName IN ('Rejected','Lost','Cancelled')…

VIEW QUESTION
Back To Top
Search