Click here to Skip to main content
15,879,094 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two databases sqlserver 2008 r2
in the query works and another shows me the following error

must have some different settings

I could say that I do change in the database showing the error?

Query in Database 1 : Result OK
Query in Database 2 : Result ERROR

SELECT Nit_Proveedor + ' - ' + nombre_proveedor as Proveedor
FROM proveedor


and show me this errror

Mens. 451, Nivel 16, Estado 1, Línea 2
No se puede resolver el conflicto de intercalación para la columna 9 de la instrucción SELECT.
Posted
Comments
[no name] 22-Jun-14 15:55pm    
Why is the most important part of your posting not in English?
[no name] 22-Jun-14 15:57pm    
http://blogs.msdn.com/b/developingfordynamicsgp/archive/2011/12/09/sql-server-error-cannot-resolve-the-collation-conflict.aspx

If Bing translator gave me the correct translation....
It appears you are trying to string together 2 columns which have different collation

How to change column collation
MSDN
 
Share this answer
 
Hi,

This error is due to string concatenation collation conflict which means that columns Nit_Proveedor and nombre_proveedor have different collation (must have the same collation here). You have a couple of options:
1. Change one column's collation to be the same as other's.
2. Specify collation in the select statement:
SQL
SELECT Nit_Proveedor + ' - ' + nombre_proveedor COLLATE DATABASE_DEFAULT as Proveedor 
FROM proveedor

(instead of DATABASE_DEFAULT you can use a specific collation like Latin1_General_100_CS_AS)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900