Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple file references
Message
De
03/09/2002 10:23:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
03/09/2002 10:18:39
Darrin Hughes
Chena-Don Textiles and Armory
Jacksonville, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00696211
Message ID:
00696216
Vues:
12
>I'm faced with a problem a little over my head... again :-)
>
>I need to exclude certain entries from the calculation of an inventory report. The problem is the perameters for the entries I need to exclude from the calculation are in a different file than the actual inventory information. The two files do have a common field name to reference to each other, but I'm not sure how to make the program look at each of the files for the comparison.
>
>To diagram it I'll call the inventory file FILE1, the other data file FILE2, the field which I can use to reference the two files COMMON, and the data I need to exclude BADDATA:
>
>FILE1 is what all the computations are figured from, and contains COMMON. FILE2 contains COMMON and BADDATA. I only want to exclude entries that have a value of W or X in BADDATA.
>
>I've got absolutely NO idea how to go about this... help?

You can do this sort of thing with a subquery. If I understood correctly, it would be something like this:
select * from File1;
  where common not in;
    (select common from File2 where BadData $ "WX")
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform