I\'m using SQL Server 2008;
Suppose I have a table \'X\' with columns \'Date1\', \'Date2\', \'Dateblah\', all of type DateTime.
I want to select the min valu
Simply lets say the table where your dates are is called sells and it has two date fields Date1 and Date2 from which you want the minimum.
sells
Date1
Date2
SELECT ( SELECT MIN([x]) FROM (VALUES(Date1),(Date2)) x([x]) ) as minimum FROM sells