Okay the title cannot explain the situation correct enough.
Now this is it,
I have a table with columns
Table1
Columns0, CHAR(20), NOT NULL.
Columns1, CHAR(4), Allow Nulls.
Data : 'ARR '
Table2
Columns0, CHAR(20), NOT NULL.
Columns1, CHAR(4), NOT NULL.
Data : 'ARR '
Then I join two tables together.
SELECT (ISNULL(a.Columns1,'') + ISNULL(b.Columns1,'')) AS WhatEver
FROM Table1 a
left join Table2 b on a.Columns0 = b.Columns0
The result should appear as 'ARR ARR '
instead of this, it appear as 'ARRARR '
Why does this happen?
EDIT 2012/06/11:
After struggling, I ended up doing things like:
SELECT ISNULL(CONVERT(CHAR(4),a.Columns1),'') + ISNULL(b.Columns1,'')
Then only I get correct result 'ARR ARR '
But I am pretty sure my data type is CHAR(4) in the database.
Thank guys..
EDIT 2012/08/06:
Another solution that I found working is to change the TABLE 2 COLUMN 1 to (CHAR(4), NULL).
This can be done through
ALTER TABLE [table_name] MODIFY [column_name] [column_data_type] [null|not null]
Your example works fine on my server (SQL Server 2008 R2):