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

Your name:

Reply:


Posted by Roy Harvey on 10/21/06 19:40

Make a list of all the "white space" characters.

Use REPLACE to change each of them to the dash character. You could
nest them, but it might be simpler to loop through them, changing one
white space character in each UPDATE.

Then reduce multiple dashes to one by using REPLACE(whatever, '--',
'-') until no more rows are updated.

Roy

On 21 Oct 2006 09:05:10 -0700, feucos@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", +, | , ., / , ! @, $, %
>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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация