Need your help to remove spaces in the column entries using SQL

Hi all,

I am new to these so plz never mind if this is funny.

here is my problem :

Table : moody

Column : Title

New column : Nospace

I have data in "Title" column of many rows which are normal sentence.

My requirment is to remove the "white space", +, | , ., / , ! [at] , $, %
etc special characters and fill it by ( hyphen) and put it in new
"Nospace" Column

Example :

I have : Hurray ! I won the Game

Needed : Hurray-I-won-the-Game

Can any body helpme in getting an SQL Query for this if possible

Thanks in Advance
feucos [ Sa, 21 Oktober 2006 18:02 ] [ ID #1508602 ]

Re: Need your help to remove spaces in the column entries using SQL

feucos [at] gmail.com wrote:
> Hi all,
>
> I am new to these so plz never mind if this is funny.
>
> here is my problem :
>
> Table : moody
>
> Column : Title
>
> New column : Nospace
>
> I have data in "Title" column of many rows which are normal sentence.
>
> My requirment is to remove the "white space", +, | , ., / , ! [at] , $, %
> etc special characters and fill it by ( hyphen) and put it in new
> "Nospace" Column
>
> Example :
>
> I have : Hurray ! I won the Game
>
> Needed : Hurray-I-won-the-Game
>
> Can any body helpme in getting an SQL Query for this if possible
>
> Thanks in Advance
>
Maybe you could start by reading the MySQL Manual on string functions:
http://mysql.speedbone.de/doc/refman/5.0/en/string-functions .html

There is some spooky function called replace... :-)

Jonathan
Jonathan [ Sa, 21 Oktober 2006 20:21 ] [ ID #1508603 ]
Datenbanken » mailing.database.mysql » Need your help to remove spaces in the column entries using SQL

Vorheriges Thema: Table structure and query efficiency
Nächstes Thema: Improving LIMIT X,Y query