Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select one or the other
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Select one or the other
Miscellaneous
Thread ID:
00302862
Message ID:
00302862
Views:
43
Hi All,

I'm trying to build a Select, but I can't get it to do what I want. This is the situation:

There's one table with three fields:
Field1 Field2 Field3
0 X A
0 Y B
0 Z C
1 X D
1 Y E
1 Z F
2 X G
2 Z H

I want to select field3 of every occurrence of field2 (X,Y and Z) where field1 is a certain value and if it doesn't exist the field3 of field1=0 should be selected. If I want this for field1=1 this would result in:

D
E
F

And if this is done for field1=2 it would result in

G
B (this one is of field1=0)
H

Who can do this the easiest way?
Next
Reply
Map
View

Click here to load this message in the networking platform