Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 Latin1_General_CI_AI and SQL_Latin1_General_CPI_CI

Author  Topic 

arv_rehal1381
Starting Member

4 Posts

Posted - 2013-10-19 : 00:53:28
I created one view when I run that view in one database it work fine but in second database it is giving me error of "Latin1_General_CI_AI and SQL_Latin1_General_CPI_CI_AS", then I checked the collation of both database and it is showing me same, both databases are in same server.

name collation_name
efrona SQL_Latin1_General_CP1_CI_AS
efroasia SQL_Latin1_General_CP1_CI_AS


Thanks

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-10-19 : 20:32:08
quote:
Originally posted by arv_rehal1381

I created one view when I run that view in one database it work fine but in second database it is giving me error of "Latin1_General_CI_AI and SQL_Latin1_General_CPI_CI_AS", then I checked the collation of both database and it is showing me same, both databases are in same server.

name collation_name
efrona SQL_Latin1_General_CP1_CI_AS
efroasia SQL_Latin1_General_CP1_CI_AS


Thanks

Can you post the exact text of the error message? "error of "Latin1_General_CI_AI and SQL_Latin1_General_CPI_CI_AS"" does not convey enough information to make a reasonable guess as to what the problem might be.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-20 : 03:45:58
I think its a collation conflict issue in columns (collation of columns can be different from default collation of database)
You need to override one collation to another for overcoming this error
In places where comparison between varchar columns of tables are involved you need to tweak it like


ON table1.column COLLATE database_default = table2.column COLLATE database_default
....


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-20 : 03:46:24
quote:
Originally posted by visakh16

I think its a collation conflict issue in columns (collation of columns can be different from default collation of database)
You need to override one collation to another for overcoming this error
In places where comparison between character columns (char,varchar etc) of tables are involved you need to tweak it like


ON table1.column COLLATE database_default = table2.column COLLATE database_default
....


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs




------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -