I am trying to create a stored procedure that replaces all values in one column with Xs the same length as the original values. Here is what I have so far:
SELECT REPLICATE('x', LEN(Name))
You need to use an
UPDATE statement to physically modify the record:
Update YourTable Set Name = Replicate('x', Len(Name))
However, I would caution that this will update EVERY record in your table to just
XXXX.... You will be effectively removing/destroying all data in that column.
Please do not run this statement unless you are absolutely certain this is what you intend to do.
If your goal actually is to remove all data from that column for every record, and your field is nullable, you could save some space by doing:
Update YourTable Set Name = Null