We recently discovered that our data has been corrupted by some editor somewhere (and our backend has not filtered it on the way in... yes, we should fix that). Specifically, we've found a delete character (0x007f
) in several places.
So far, we've been able to locate them by finding one when it breaks something, then do SELECT * WHERE [TheColumn] LIKE '%%'
(yes, there's a DEL char between the two %
signs) on the place where it showed up to see if there are more of them.
Is there a way to do a database-wide query that would show all tables and columns where we need to go through the data and clean it?
In pseudo-code, I'm looking for something equivalent of
SELECT theTable, theColumnFROM entire databaseWHERE for any row in theTable, theColumn matches LIKE '%%' -- DEL char between %'s