I am using SQL Server 2008;
Suppose I have a table "X" with columns "Date1", "Date2", "Dateblah", all of DateTime type.
I want to select the minimum value between three columns, for example (simplified, with date mm / dd / yyyy)
ID Date1 Date2 Dateblah 0 09/29/2011 09/20/2011 09/01/2011 1 01/01/2011 01/05/2011 03/03/2010 ID MinDate 0 09/01/2011 1 03/03/2010
Is there a bread and butter team for this?
Thanks in advance.
EDIT: I saw this question. What is the best way to select the minimum value from multiple columns? but, unfortunately, it doesnβt suit me, because I am obligated to do it against normalization, because I report on working with tfs, and the βbrute forceβ case will ultimately be painful if I have 6 cu . 7 columns.
datetime sql-server min
Conrad Clark Sep 29 '11 at 13:37 2011-09-29 13:37
source share