>Something like this:
>
>sele ;
> iif(date1>date2,ind1,ind2) as ind;
> from (yourtable);
> where ind1==ind2
>
Given this, the compare doesn't matter at all:
SELE ind1 AS ind FROM (yourtable) WHERE ind1==ind2
>
>>>>>>>>>>>>Your message below
>I cant figure out how to do this. I have a table which looks like:
>
>
>proc_code ind1 val1 date1 ind2 val2 date2 ind3 val3 date3
>--------------------------------------------------------------------------
>000000001 A 102 10/11/99 A 155 04/02/01 Y 155 05/16/98
>000000002 C 865 02/19/98 W 251 03/12/00 K 157 12/12/98
>
>
>What I need to do, is when the IND value repeats in any of the other
>IND columns on the SAME record, get the VAL value for the latest date.
>
>In the above example, this would mean that on the first record, I would
>get back the VAL2 value of 155, because the IND "A" repeats and Date2
>is the greatest date.
>
>On record 2, the IND does not repeat, so ignore the record.
>
>Anyone have any ideas?