During the process of producing a solution in C # records were saved forming a "folio" with a literal, a cell value and an id
'C'+ISNULL(Columna1,'')+Columna2
Example of result:
C96
CX85
The queries have not changed, the same database engine is still used (MSSQL server 2008) but now the same query brings the following difference:
'C'+ISNULL(Columna1,'')+Columna2
C 96
I do not understand why ISNULL(Columna1,'')
returns a space (I already make sure that the column actually has NULL
).
I know that you can solve the problem by adding LTRIM
or RTRIM
, however I would like to know why this change.