Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro Substitution
Message
From
13/02/2003 17:15:52
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
13/02/2003 17:11:04
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00752893
Message ID:
00752955
Views:
21
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform