Jump to content

Inner Joins


ameliabob

Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...