In the SQL server, the default collation is SQL_Latin1_General_CP1_CI_AS
, previously, I used to specify the collation explicitly at the end of each query to SQL_Latin1_General_CP1_CI_AI
to ignore the accents when comparing strings.
Now, I wanted to implement a generic solution, so that, I changed the database collation to SQL_Latin1_General_CP1_CI_AI
but the queries are still not working unless I specify the collation explicitly!
I searched a bit for this issue and I knew that the columns that were created previously using the old collation, have to be updated as well to the new collation or have to be dropped and recreated again!
Is there any idea to handle this issue without updating all columns one by one?
Here is a sample of the queries that I have With specifying the collation:
select * from Members where FirstName like '%cafe%' collate SQL_Latin1_General_CP1_CI_AI
Without specifying the collation:
select * from Members where FirstName like '%cafe%'