views:

33

answers:

2

So I'm running a query against my database and looping through the results and getting something like-

F.�B.�Webster�Day�

in most of the results. Those should be spaces but it must've been something weird during the import/conversion (damn you M$).

Is there a quick query I can run against the DB to remove all of those and replace them with spaces?

+1  A: 

it should be a different collaption from the two databases... try to change the db collaption as the old...

Marcx
s/collaption/collation/
DaveE
+1  A: 

IS there anyway you can get a HEX dump of the output?

From the looks of it these characters probably started life as the NBSP (non breaking space character) x'A0', but they may have been mistranslated to something else.

If it is you can easily fix this using the REPLACE() function in an update statement.

James Anderson
The replace worked great. What I did was just go into the database using SQLyog (but I guess any other DB manager would work) and copy/pasted the weird space " " and then did a replace with a normal space " " and ran this query: `UPDATE attorneys SET ``name``=REPLACE(``name``," "," ")` worked like a charm, thanks!
Marty
The table named 'name' should have the tick quotes around them but here it interprets them as code markup and isn't showing them. Just for future posterity and anyone who finds this post w/ a similar question.
Marty