Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to judge the value in one fieds is only?
Message
From
17/05/2002 10:09:07
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
17/05/2002 10:07:00
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00658167
Message ID:
00658173
Views:
21
>>Hello everyone:
>>How to judge the value in one fieds is only?
>
>If you mean that you want to have a value in one field, or in the other, but not in both, check for:
>
>
>empty(Field1) # empty(Field2)
>
>
># is equivalent to the XOR (exclusive-or) operator (missing in VFP), but you have to be careful with order-of-precedence.
>
>HTH, Hilmar.

Personally, to make it more readable, I would use:
empty(Field1) XOR empty(Field2)
This means that in one of my #INCLUDE files I have the statement:
#DEFINE XOR #
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