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.
| Author |
Topic |
|
hameedf
Starting Member
27 Posts |
Posted - 2012-07-10 : 08:44:33
|
| Hello experts !I am in problem my all db views works fine but few views when i select top 1000 rows from sql having errorMsg 468, Level 16, State 9, Procedure zh_CN, Line 135Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CS_AS" and "Latin1_General_CS_AS" in the equal to operation.Msg 4413, Level 16, State 1, Line 117Could not use view or function 'PET.dbo.zh_CN' because of binding errors.Please helpHameed |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2012-07-10 : 10:10:54
|
| >>Could not use view or function 'PET.dbo.zh_CN' because of binding errors.This refers to the fact that at least one of the underlying tables in this view has been modified since the view was created. A column renamed or dropped. Fix the view definition then compile it.>>Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CS_AS" and "Latin1_General_CS_AS" in the equal to operationThis refers to some correlation you are using in a your statement where one of the columns being correlated is of a different collation then the other. Assuming the different collations are intentional then you can correct that by specifying the collation in the correlation:a.col = b.col collate SQL_Latin1_General_CP1_CS_ASEDIT:if the collation difference is not intentional then you would need to ALTER TABLE <table> ALTER COLUMN <column> <datatype> [not] null collate <collation>Be One with the OptimizerTG |
 |
|
|
xhostx
Constraint Violating Yak Guru
277 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-10 : 10:26:18
|
| you can always override collation at runtime using COLLATE clause. just use COLLATE DATABASE_DEFAULT at the places you do varchar column comparison between the tables------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2012-07-10 : 10:46:35
|
quote: Originally posted by visakh16 you can always override collation at runtime using COLLATE clause. just use COLLATE DATABASE_DEFAULT at the places you do varchar column comparison between the tables
Unless of course you need to override the default db collation for a given correlation which is why I included COLLATE clause above with a specific collation.Be One with the OptimizerTG |
 |
|
|
|
|
|