Hi,
I have the following sql query which, for some strange reason, it doesn't display the same results.
The back end is mysql database (innodb), the front end an Excel GUI.
When run on Excel 2003, the following query shows all the correct records.
However when run on Excel 2010, the results are different !
Same mysql database, just different excel versions.
ON excel 2003 the results include "new delhi, new orleans, new york"
On excel 2010 the results include only "new delhi, new orleans" ????
However, if on Excel 2010, I run the query using g.airportdest LIKE 'new york%', then it displays the correct info (only new york though)
Perhaps the sql query itself is not correctly structured?
Any guidance will be appreciated.
SELECT DISTINCT g.ID, g.Route, g.`airline`, MAX(g.Validfrom) as Validfrom,
g.Validto, g.Service, g.airportorigin, g.airportdest, g.AIRRATE
FROM `global`.`air_rates` as g
WHERE g.ValidFrom<= '2010-03-01'
AND g.Validto>= '2010-03-01'
AND g.airportorigin LIKE 'paris%'
AND g.airportdest LIKE 'new%'
GROUP BY g.airportorigin, g.airportdest,g.`airline`;