I have table FOO, fields F1, F2, F3, F4, and F5.
I need a single SELECT statement on FOO that returns the LOWEST date
between the five fields.
So, if table records looked like
FOO:
F1 F2 F3 F4 F5
3/25/03 3/12/03 3/10/03 3/15/03 3/22/03
5/03/03 5/10/03 5/22/03 5/22/03 5/03/03
9/10/03 9/09/03 9/12/03 9/01/03 9/15/03
The select statement would return:
3/10/03
5/03/03
9/01/03
Again, this would need to work in a single select statement. If it is
impossible, then if a stored procedure could be used, please show
that.
Thanks!!
Marc
I need a single SELECT statement on FOO that returns the LOWEST date
between the five fields.
So, if table records looked like
FOO:
F1 F2 F3 F4 F5
3/25/03 3/12/03 3/10/03 3/15/03 3/22/03
5/03/03 5/10/03 5/22/03 5/22/03 5/03/03
9/10/03 9/09/03 9/12/03 9/01/03 9/15/03
The select statement would return:
3/10/03
5/03/03
9/01/03
Again, this would need to work in a single select statement. If it is
impossible, then if a stored procedure could be used, please show
that.
Thanks!!
Marc
Comment