Hi,
I have a table that looks like this:
ID Date1 Date2 Date3 Date4
-- ----- ----- ----- -----
1 1 Jan 2 Jan 3 Jan 4 Jan
2 10 Feb 8 Feb 6 Feb 4 Feb
I want to return:
Each ID, and the max date across the four date columns.
eg.
ID DateMax
-- -------
1 4 Jan
2 10 Feb
I'm after any direction on how I best do this with SQL!
Thanks in advance, rather urgent.
I have a table that looks like this:
ID Date1 Date2 Date3 Date4
-- ----- ----- ----- -----
1 1 Jan 2 Jan 3 Jan 4 Jan
2 10 Feb 8 Feb 6 Feb 4 Feb
I want to return:
Each ID, and the max date across the four date columns.
eg.
ID DateMax
-- -------
1 4 Jan
2 10 Feb
I'm after any direction on how I best do this with SQL!
Thanks in advance, rather urgent.