I had a situation where a '\x0d' charater was appearing (appended) to the data in a single column.
In a stored procedure, data is retrieved and a #table is used for data manipulation.
At the end of the proc, the data is inserted into a permenant table, selecting from the #table.
However, in 1 column (not all) a carriage return, '\x0d', was appended to the data.
this was not in the #table and I could not see why this was happening.
I recompiled the permenant table and the error disappeared.
My concern is this is a production procedure & table, and it is not feasible to re-create the table and rerun the procedure every time (if) it reappears.
Any experience of this issue?
How can you tell "this was not in the #table"? Did you print the data? Did you save the data somewhere? The #table is not accessible outside the SP...
I also don't understand the sentence "I recompiled the permenant table" ... What database engine allows to recompile tables?
So please post the SP code, the SQL engine used and we may tell where is the problem.
Without additional info I can only state the '\x0d' charater was in original data or it was added by some trigger. It cannot appear from nothing.