Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Min of decode explaination
On Thu, 2004-07-29 at 07:31, Lee Lee wrote:
> SQL> select min(plan_start_dt),
> min(decode(ord_stat,'OP','',plan_start_dt))
>
> from test_tbl;
>
> MIN(PLAN_ MIN(DECOD
> --------- ---------
> 03-NOV-04 01-DEC-04
>
> 1 row selected.
>
try:
select min(a.plan_start_dt), min(a.plan_start_dt2) from (
select plan_start_dt,
decode(ord_stat,'OP','',plan_start_dt) plan_start_dt2
from test_tbl
) a
Jared
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Thu Jul 29 2004 - 09:42:20 CDT
![]() |
![]() |