Blank spaces and Distinct query

admin

Administrator
Staff member
I need to count distinct records, only due to sloppy input some have extra spaces in them. For instance the same name might have been entered as:
Veltkamp, Steve (one space)
Veltkamp,Steve (no spaces)
Veltkamp, Steve (two spaces).

How can I avoid having the name count as three separate names? Alternatively, is there a way to clean it up easily in the db?

I'm using a SELECT DISTINCT Author, Title
(PHP4, MySQL 3.23)
 
Back
Top