• Sue_H (10/26/2016)


    Another option...

    You can use the values clause to get min and max values across a row but YMMV. I've had case statements outperform it at times and other times it performed better or the same as other approaches:

    SELECT CaseID,

    (SELECT MIN(x)

    FROM (VALUES (MTDThresholdDate),(YTDThresholdDate)) AS value(x)) as MinDate

    from YourTable

    Sue

    Yes, this is what I suggested above.