I discovered(*) today that, depending on the server, my TSQL commands were case-sensitive, meaning that, when one table's column is named tableId
, the following instruction might not succeed:
SELECT TableId FROM myTable
Depending on the column's collation. SQL_Latin1_blablabla
seems not to be case-sensitive, when Latin1_blablabla
is.
So my first question is WHY!!!
And the second one is: what is the quickest trick (sp?) to change all collations for all concerned columns in the database?
EDIT: to make things very clear:
SELECT tableId FROM myTable
Work on all servers while
SELECT TableId FROM myTable
Works only on the server with the SQL_Latin_blablabla
collation. Notice the difference between the 2 strings. We are not talking here about data collation, but about the impact of this collation on the way we write code!
(*) I could use here some additional and specific word to qualify my state of mind after this 'discovery', but all of them are adult-rated ...