Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> remapping and keeping original value?
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.4283Seattle, WA Received on Thu Nov 18 1999 - 17:57:57 CST
![]() |
![]() |