var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Combinding Fields
Using SQL2005. I have two char fields that I need to combind into one field, but keep getting an error.
A.Company + B.Sub_Compnay as 'B_Unit'
from tableA as A
left join tableB as B
on b.key = a.key
Error I keep getting
Msg 457, Level 16, State 1, Line 20
Implicit conversion of char value to char cannot be performed because the collation of the value is unresolved due to a collation conflict.
Thank you for your help
The two columns (A.Company and B.Sub_Company) have different (incompatible) collations, so you can't just concatenate them. You need to either change the collation so they are the same, explicitly specify a compatible collation for one of the two columns, or explicitly specify a common collation for both columns.
Thank you for the info, but how do I specify a compatible collation for one of the two columns, or explicitly specify a common collation for both columns.
Be forewarned that you need to read up on collations before you make any wild decisions, but you can start with:
SELECT A.Company, B.Sub_Company
, A.Company + B.Sub_Compnay as 'B_Unit'
FROM tableA as A
LEFT JOIN tableB as B
ON (B.key COLLATE SQL_Latin1_General = A.key COLLATE SQL_Latin1_General)