ameliabob Posted January 14, 2016 Share Posted January 14, 2016 I have tried using tables with and without quotes and field names with and without quotes and I keep getting the 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 '.* , 'commmoditybase'.'cf' FROM 'dailydata' INNER JOIN 'commoditybase' on 'daily' at line 1 SELECT 'dailydata'.* , 'commmoditybase'.'cf' FROM 'dailydata' INNER JOIN 'commoditybase' on 'dailydata'.'symbol'='commoditybase'.'symbol' WHERE contractDate='2012-06-13' ORDER BY contract Do I have the WHERE and ORDER BY in the wrong sequence? Thanx Link to comment Share on other sites More sharing options...
justsomeguy Posted January 14, 2016 Share Posted January 14, 2016 It is complaining about the ".*", not the WHERE and ORDER BY. You don't quote identifiers like table and field names, quotes are only for string data. The delimiters for identifiers are backticks, not quotes. http://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks Link to comment Share on other sites More sharing options...
ameliabob Posted January 14, 2016 Author Share Posted January 14, 2016 OK, thanks. I interpreted the example as having single quotes not back ticks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now