Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help? Select latest and earliest date from a row containing three dates.
dan_at_dangray.org (Dan Gray) wrote:
>Hi,
> I'm stuck. Any one got any feedback on how to select from a database
>containing...
>
>pa1date | pa2date | pa3date
>2003-03-03 | 2003-04-03 | 2003-05-03
>
> The lowest, middle and highest dates individually on request? It's a
>stats program and while I've written a perl routine to pull all three
>dates and them parse then into order it's not very elegant and there
>must be a way to do it is SQL, I just can't find it!
>
> Regards
> Dan Gray
You can use the MIN and MAX functions in SqlPlus to get the low and high, but the middle will be a problem; - middle has no real meaning to Oracle.
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- Received on Wed Jun 11 2003 - 14:24:16 CDT
![]() |
![]() |