Tuesday, June 29, 2010

Always try to check the spellings... and be consistent with them :)

Well this is the basic most important thing to to do. This helps you retrieve information easily. Today I spent 10 mins trying to figure out a problem. I was to retrieve data from some_analysis table. How did I know that a table with name some_analysis existed. That's easy I had a foreign_table that had a column named Some_Analysis_ID. So I constructed a query, but query failed to execute.

select * from some_analysis where id = (select some_analysis_id from foreign_table where id = 13);

I asked my colleague if this table existed and he verified that there was a table with this name. So after much effort I fond the DB schema, and guess what I found. Table name was some_analysEs

I was mad first but realized that analyses are legal spellings as well :( The only problem was consistency

No comments:

Post a Comment