Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select one or the other
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select one or the other
Divers
Thread ID:
00302862
Message ID:
00302862
Vues:
42
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?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform