Moderators Kyle Posted March 27, 2012 Moderators Report Posted March 27, 2012 Hey, I'm trying to make an query to get all of the passenger loads columns from the PIREP tables. Here's the SQL Query i ran in our database manager SELECT SUM(load) AS passengers FROM pireps And I got the Query error... #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'load) AS passengers FROM pireps' at line 1 Does anyone know why? I tried to sum the fuelused column and it worked, same query, but what the heck, why not to the loads column? Hopefully someone can shine in! Quote
Moderators Parkho Posted March 28, 2012 Moderators Report Posted March 28, 2012 Are you trying to get the total pax carried? or you want pax of each pirep seperately? Quote
Moderators Kyle Posted March 28, 2012 Author Moderators Report Posted March 28, 2012 Are you trying to get the total pax carried? or you want pax of each pirep seperately? Yep all in total. Quote
Guest lorathon Posted March 28, 2012 Report Posted March 28, 2012 Try this SELECT SUM(`load`) AS passengers FROM pireps Quote
Moderators Kyle Posted March 28, 2012 Author Moderators Report Posted March 28, 2012 Try this SELECT SUM(`load`) AS passengers FROM pireps Thanks! That did the trick. . Forgot about the ` in the query. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.