Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I NEED HELP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00471821
Message ID:
00472108
Vues:
39
>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?
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform