Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complex SQL Select
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Complex SQL Select
Divers
Thread ID:
00712719
Message ID:
00712719
Vues:
35
I have the following two tables (Purchase and vehicle) in a SQL Server table. Is there a way to produce the result set where it will show the expensive vehilce purchased by a person, using a single SQL Select (it can be nested.) I can bring down both tables in to Fox using SPT and then programmatically find them. But the problem is if the Purchas table is so big, then it will be an issue.

Important Note: This is not my school home work! I just created an example for a real problem I am having now.

Purchase
Person, Vechicle, PuchaseID
A, Car, 1
A, Truck, 2
A, Bike, 3
B, Bike, 4
B, Jet, 5
C, Truck, 6
D, 4WD, 7
D, Bike, 8

Vehicle

Vehicle, Price
Car, 5000
Bike, 100
Truck, 7000
Jet, 30000
4WD,6000


Expected Result Set

Expensive Vehicle
Person ExpensiveVehicle
A Truck
B Jet
C Truck
D 4WD
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform