Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Are Column names case sensitive in SQL queries?  RSS feed

 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

We just upgraded our database from MySQL 4.1 to MySQL 5.0. A query I had that worked in 4.1 does not work now. The message I am getting is :

SQL Error Unknown column 'equipmenttable.equipmenttype' in 'on clause'

The column name that I am having problems with is equipmentType. I refer to it as equipmenttype (small t) instead of the capital T in the table definition.

Anyone know why this would work in one version and not the other?
Thanks.
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, it's not case sensitive.

There were changes to the join syntax in MySQL 5, this could be cause your error. Could you post your query?
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you might be right. I did have to change several other queries when we switched.

Here is the query that is causing me woe's:
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much. I rearranged the joins of the query and am no longer getting the error. Thanks for saving me from going down the wrong path on this one.

Here is the query that works :
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!