Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro Substitution
Message
De
13/02/2003 17:15:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
13/02/2003 17:11:04
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00752893
Message ID:
00752955
Vues:
11
>Thanks, I got it....
>Jim
>
>>>What I want to do is select records from a table based on the qqfield. The qqfield values for each record are different and are based on other variables in my program...
>>
>>In that case, perhaps you can use the evaluate() function:
>>
>>
>>select * from promolist;
>>  where qq_promo and BITTEST(region,0);
>>  and DATE() <= promolist.expire;
>>  and IIF(!EMPTY(promolist.qqfield), eval(Promolist.qqfield), .T.)
>>
I think the last line:
  and IIF(!EMPTY(promolist.qqfield), eval(Promolist.qqfield), .T.)
can also be simplified:
  and (EMPTY(promolist.qqfield) or eval(Promolist.qqfield))
Although some discussion may arise as to whether the second version is really simpler. It uses less characters, but an important question is: which version is easier to understand.

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