Re: Help with MIN field value

From: Ramesh <ramjag_at_hotmail.com>
Date: 25 Sep 2003 16:15:25 -0700
Message-ID: <68885609.0309251515.23d023db_at_posting.google.com>


The select statement would be

select least(f1,f2,f3,f4,f4) from foo;

lefebvre_at_iwavesolutions.com (Marc A. Lefebvre US-775) wrote in message news:<5ef1a86c.0309191233.79cdb6b3_at_posting.google.com>...
> 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
Received on Fri Sep 26 2003 - 01:15:25 CEST

Original text of this message