Can someone guide me in the right direction. I’m trying do an update and replace on a column in a database. This is the SQL code that I am using (SQL 2008 Express Edition).
*update GameList set image = replace(Image, 'NintendoDS', 'Nintendo DS') WHERE Image LIKE '%NintendoDS%'*
Image
/webimages/NintendoDS/boxmonstersvsaliens.jpg
This is the error I am getting:
String or binary data would be truncated.
The statement has been terminated.
The problem is there is a row where adding the extra space (or spaces if the test string is repeated) would make the resulting string bigger than the column size.
For example if the column is declared varchar(20) you are trying to add a string of size 21