Forum Discussion
ukluk
9 years agoRegular Visitor
MIN or MAX value between current row and scalar?
My task is simple yet I cannot find the answer.
I want to return the ExpirationDate value for each row, but if it has not yet expired, then return NOW()
In C# myDate = Math.Min(expirationDate, Now())
The MIN aggregator is looking for the entire table, but I just want to apply the comparison for each row agains a scalar.
Thanks,
Uri
Create a new column like:
Column = IF(ISNULL([expirationDate]),NOW(),[expirationDate])
1 Reply
- Greg_Deckler
Community Champion
Create a new column like:
Column = IF(ISNULL([expirationDate]),NOW(),[expirationDate])