Who can explain why
select case when '' = ' ' then 1 else 0 end, LEN(''), LEN(' '), DATALENGTH(''), DATALENGTH(' ');
yields
----------- ----------- ----------- ----------- -----------
1 0 0 0 1
The funny consequence of this is that in
create table test ( val varchar(10) );
insert into test values( '' );
update test set val = ' ' where val = '';
the update will indeed replace the empty string by a blank, but the where clause keeps to be true and repeated executions of the update statement tell
(1 row(s) affected)