Trying to use Case in SOQL's select. SOQL doesn't like that one bit! Any ideas what's the equivalent of Case?
My code should be something like:
SELECT Client_Account__c,
CASE Max(Termination_Date__c) <= TODAY
THEN Termination_Date__c
ELSE 'Active'
FROM Plan__c
GROUP BY Client_Account__c
LIMIT 100
Best Answer
There is no equivalent in SOQL. More to the point, you'll need some code. You'd have to query all rows, then determine which one you'd like to use.