I have two SQL server databases which use the same code.
I am getting below error:
Error when executing tsp_parse_str_int at line 26. Error message: Conversion failed when converting the nvarchar value '1000 ' to data type int.
If you notice there is a leading space, however in my code I am removing the space before the conversion!
SET @temp = (select replace(@temp, ' ', ''))
SET @projid = cast(@temp as int)
Thanks,
Bruce
I found out it was actually not a space, either a carriage return tab or new line, I got rid of by:
REPLACE(REPLACE(REPLACE(MyField, CHAR(10), ”), CHAR(13), ”), CHAR(9), ”)