I just fill up my database with an excel file and after checking out it i saw that in many column there is an error.
I check out on internet and it is a bug of Excel when insert cells in multiline. So now the word “x000D” is present in many columns.
How i can delete it with a query with sql in the whole database?
If you wanna do this on all your database, you have to create a procedure looping through
the
INFORMATION_SCHEMA.COLUMNSview, which will give you all columns (with their tables) of your database. You can check the DATA_TYPE of your columns (you don’t need to update integer columns, for example)Then with dynamic sql, build a query like that in the loop
and execute it.
EDIT
Faster, not so clean, without a stored proc, you can type in SQL Server Management studio :
you copy the result and execute it, and you’re done.