I am trying to update these empty space records to empty strings but even if say it updated doesn't update. I run command over and over again it still says X rows affected. data type var char(2) I converto to nvarchar(2) still same
UPDATE Foo SET Boo = '' where Boo = ' '
(21297 row(s) affected)
MS Sql 2012
Try with the below query.
UPDATE Foo
SET Boo = ''
WHERE replace(Boo,' ','')= ''
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With