Moderators Kyle Posted March 27, 2012 Moderators Report Share 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 Link to comment Share on other sites More sharing options...
Moderators Parkho Posted March 28, 2012 Moderators Report Share Posted March 28, 2012 Are you trying to get the total pax carried? or you want pax of each pirep seperately? Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 28, 2012 Author Moderators Report Share 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 Link to comment Share on other sites More sharing options...
Guest lorathon Posted March 28, 2012 Report Share Posted March 28, 2012 Try this SELECT SUM(`load`) AS passengers FROM pireps Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 28, 2012 Author Moderators Report Share 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 Link to comment Share on other sites More sharing options...
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.