• I'd like to join the club!

    As I mentioned to Andy, I have been working on a database that has all objects NOT owned by DBO and has case sensitivity turned on. I do have to admit that the ordeal has caused my coding to become more stringent -

    for instance, now I am in the habit of doing the following:

    • tables, stored procedures, column names, etc are CAPITAL letters only.
    • all logins, (potential owners), whatever you want to call them, are lowercase.
    • All calls to tables, stored procedures, etc. have to have the owner declared - as in
    • select * from owner.TABLE_NAME
    • All variables and table aliases are lowercase, while field aliases are UPPERCASE - as in
    • create procedure owner.PROCEDURE_1 
      
      @variable_1 int
      as
      select count(t1.PK_FIELD) as T1_QTY
      from owner.TABLE_1 t1 INNER JOIN
      owner.TABLE_2 t2 on t1.PK_FIELD= t2.FK_FIELD
      where t2.FILTER_FIELD = @variable_1

    This may all seem a little crazy, for instance, why not just have all the logins, variables, parameters, etc be UPPERCASE? I guess that would work even better! The problem is that the logins were all lowercase (and so the object owner was already lowercase), etc. My point is that I have been FORCED to develop coding standards simply so that I could code at all.

    One thing that is really annoying about using case sensitivity is that whenever you 'borrow' code from someone - say from the scripts section of a website, IT NEVER WORKS! And you spend time debugging it, and working through the problems. Especially painful are canned sprocs like sp_MSforeachtable where the sproc has mixed case in it!

    I've learned to use better coding practices from the experience, but that is the only good thing I can think of to say.