We have a table that stores a large string of text and within the text is a debit card number, the string of text is copy and pasted from an email the customer has sent in.
How can I search through the 7000+ records and identify/replace the card numbers from 0000-0000-0000-0000
to XXXX-XXXX-XXXX-0000
?
Best Answer
This can handle one credit card per row. If you suspect there can be more than 1 then just execute the UPDATE multiple times (In the demo I ran it as separate statements but you can use
GO X
)Demo
(2 row(s) affected)
(1 row(s) affected)