select replace(stuff('123456',2,2,'ABCD'),'1',' ')
select LEFT('ABCD456',4)
select left(replace(stuff('123456',2,2,'ABCD'),'1',' '),4)
Ok now the first select outputs 'ABCD456', the series of functions evaluates to that exactly the first parameter to the left function in the second select second select returns 'ABCD' as expected third select returns 'ABC'
Why? Shouldn't it also output 'ABCD'? Does anybody know? Thanks in advance.