Upvotes: 8<=-=Mar 5 2017 2:42PM=-=>
Thanks for this idea. This is a valid requirement and I hope that it will get more votes. Currently we cannot confirm when it will be added, but it is in our backlog.<=-=May 22 2017 5:03AM=-=>
would like it very much, particularly since you already have the CONCAT / GREATEST() a variable number of paramenters and does something with it…<=-=Jun 5 2017 12:31PM=-=>
GREATEST / LEAST functions would be fantastic addition.<=-=Nov 14 2017 3:42PM=-=>
The workarounds using CROSS APPLY or CASE expressions are difficult to manage and read. I’d love to see these implemented.
An error occurred while saving the commentAnonymous commented
Easiest way to work around this is to use a derived table e.g.:
SELECT a.asset_id, a.added_on, a.changed_on
FROM (VALUES(a.added_on), (a.changed_on)) AS bothDates(EditDate)
) as lastEdit
FROM Asset a;
Not as easy as a NON-aggregate column, but will work quite efficiently. It must be noted that in some cases CASE statements may be more performant. But until this feature is added to SQL Server it is quite a cool work around.