SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 Latin1_General_CI_AI and SQL_Latin1_General_CPI_CI
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

arv_rehal1381
Starting Member

4 Posts

Posted - 10/19/2013 :  00:53:28  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3559 Posts

Posted - 10/19/2013 :  20:32:08  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 10/20/2013 :  03:45:58  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 10/20/2013 :  03:46:24  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000