General information
Category:
Coding, syntax & commands
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only