Home > SQL Queries, SQL Server, T-SQL > Collation — Another update for Case Insensitive collations.

Collation — Another update for Case Insensitive collations.

Usually simple queries on a database using Case insensitive collation runs without any issues. In case insensitive collation

select * from LISTS

is same as

select * from lists

but I faced a problem while executing the query on DB with collation “Turkish_CI_AS“. The table name was PERIOD ( all upper case). The query worked fine when the statement was as given below.

SELECT * FROM  PERIOD

but when I changed the case as

SELECT * FROM period

the query failed with an error “Invalid object name ‘period’.” . When I further investigated, I found that the letter “i” has a different ASCII value in Turkish collation compared to the collation used by windows( i = 105 in latin and i =253 in turkish). Hence it was not able to find any table by name “period”.

any addition to this posts will be greatly appreciated.

Hope this might be of some help to you. :)

Advertisements
Categories: SQL Queries, SQL Server, T-SQL
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: