Subject Re: [firebird-support] Getting rid of extra spaces
Author Milan Babuskov
Nick Upson wrote:
> I want to get rid of extra spaces between words in a varchar field
> Can anyone reccommend a method?

The best would be to do it from your application, or write a simple
application that does it. The algorithm is simple:

while (double space exists in field)
replace double space with single space;

If you must do it in database, you can write an UDF, or stored
procedure. SP may be a little awkward way of doing it, you would have to
use go though value, search for ' '. You can use a simple loop and
substring for that. And to replace ' ' with ' ', use substring and
concatenation ||

Milan Babuskov