Hi I am having a problem when trying to update a table using an IN clause, I have a big list of clients that should be updated 4500+.
Update table
set columnA = 'value'
where ID in ( biglistofids ) //biglistofids > 4500 ids
I am getting this error "String or binary data would be truncated."
I tried the same script with fewer ids lets say (2000) and it worked fine.
I have also tried using a temporal table but I got same error.
SELECT Id INTO tmpTable FROM dbo.table WHERE id IN (biglistofids) //create temporal table succesfully
Update table set columnA = 'value' FROM table INNER JOIN tmpTable ON table.ID = tmpTable.ID
Is there any way to handle this, without repeating code for each 2000 records?
Thanks in advance