Hi everybody,
I am trying to help the client with the strange problem. Instead of UPDATE command that he is supposed to be running according to the code in the application, he is running INSERT which is failing because he can not insert duplicate data.
So, in order to isolate the problem I am trying to run this statement directly in the query window
select DATALENGTH(report) as RepLen, DATALENGTH(operator) as OperatorLen,
* from dbo.rep_crit update dbo.rep_crit set report = LEFT(RTRIM(report)+ SPACE(20),20)
I ran these statements several times and still the datalength for the report column is wrong (less than 20).
Do you see what may be the problem?
For every expert, there is an equal and opposite expert. - Becker's Law
My blog