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 2008 Forums
 SQL Server Administration (2008)
 Collation

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2010-03-13 : 01:51:28
What does it really mean? As for anything else on the msdn forums, all that's ever posted on there is absolute garbage, for the finickity geek backroom finger addict.

I know a SQL Server can be based on a number of different settings. My Safari browser has an Appearance pane of Western (ISO Latin1) I've always used as a default, otherwise Hewbrew, unicode, Japanese, Chinese, Turkish, Cyrillic, and so on. What is the point of that?

Only sometimes SQL Server gives up on my query with an attitude of "I can't be arsed - I'm not gonna parse yer query cos I'm in a bad mood", This is data. What's the problem?

I know the answer is generally to copy the parenthesised red error collation to a join:

collate "the string" either side of the = what affects which side of the join it should go? Both, or left or right of it?

Doing this usually solves the problem immediately, slowing down the execution to about -10x speed. Poor computer.

Problem now is when I copy this collation error string to the ON join, there are two other conditions as ANDs, and query failure occurs on these lines of the query. Just adding collation on any combo of the three still doesn't work.

Is this to do with 1. the one server setting, or 2. all to do with field types in particular? Haven't got the script to show you now.

I use a local server, and 3 linked servers. I was amazed to find out that the collation method of something like: Latin1 CL1_AS was exactly the same!!! So where does the problem arise, at all? I detect that the dumb ass who set up his server is the problem. Collation is almost always needed when using his data against the other servers.

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-13 : 02:02:52
collation basically speaks of what all language characters SQL db can support, how it handles that data (case sensitivity etc). Collation can be specified at server,db or table column level. By default column will assume collation of db but you can override it with COLLATE clause on creation of column in CREATE TABLE or ALTER TABLE script. When comparisons are done b/w columns of different collation, then SQL server throws this error when it cant resolve the conflict. Sometimes this can occur when you've temp tables in query and collation of tempdb is different. Then solution is force the either of collation to other or force both of them to default db collation

http://blog.sqlauthority.com/2007/06/11/sql-server-cannot-resolve-collation-conflict-for-equal-to-operation/

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

mikebird
Aged Yak Warrior

529 Posts

Posted - 2010-03-13 : 03:23:32
Good message. If only Apple just created some DB software, the planet would run, and not have a world of EE RR OO RR SS which Microsoft is based on. Sad geeeeeeeks

I shall inspect on columns datatype for the errors.

We work with a remote set of locked confidential datawarehouse data-gathering kit whose datatypes can never be altered or improved. No drop / recreate, sadly. I drop / recreate tables regularly, for developer improvement, with permissions...

Maybe I should just pull all the relevant dataset I'm working with, stick it onto my local DB and force all the types how I want 'em, to report on. Is this better? Or should I be able to put a function (convert / cast) on problematic fields, on the fly?

Thanks
Go to Top of Page
   

- Advertisement -