Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> remapping and keeping original value?

remapping and keeping original value?

From: Douglas Nichols <dnichols_at_fhcrc.org>
Date: Thu, 18 Nov 1999 23:57:57 +0000
Message-ID: <38349285.20847BAA@fhcrc.org>


I am trying to remap a field so I can order the out come then get the original field.
Something like this:
I have mydata ( id, var1, var2);
I need to eval var2 as decode(var2, 1,1,0,2,2,3,4,0,5) as flag; Find the lowest value of flag then return id, var2

something like
select id, var2, min(decode(var2,1,1,0,2,2,3,3,0,5)) as flag   from mydata
 group by id;

This doesn't but this is like what I am after.

Thanks ahead of time!

--
Cheers, dn

Douglas Nichols                              dnichols_at_fhcrc.org
---------------------------------------------------------------
National Wilms Tumor Study Group                   206.667.4283
Seattle, WA Received on Thu Nov 18 1999 - 17:57:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US