Vote count: 0
I believe know where my problem is but I am unsure how to fix it. I am trying to find a trip where the the departure location is different from the Arrival location. But the way I wrote the code makes it so the it only returns sets that have the same departure and arrival location. How can I go about this issue? I want to find a trip that departs from Boston and arrives to Nassau while avoid using code like trip. DepartureLocCode = "BOS"
SELECT name
FROM staff, trip, locations
WHERE trip.TripNum = staff.TripNum AND staff.DATE = trip.DATE AND trip.DATE = '2015-08-14'
AND (trip.ArrivalLocCode = locations.LocationCode AND locations.Location = "Nassau")
AND (trip.DepartureLocCode = locations.LocationCode And locations.Location = "Boston");
asked 1 min ago
mysql code returns an empty set
Aucun commentaire:
Enregistrer un commentaire