char replacement

This is a discussion on char replacement within the MySQL Database forums, part of the Database Forums category; Hi, I have a table with a field that contains a file path(www/docs/.../.../...) Some of the path contain ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-03-2005
VooDoo
 
Posts: n/a
Default char replacement

Hi,
I have a table with a field that contains a file path(www/docs/.../.../...)
Some of the path contain this characters 'é' or 'è'.
How can i do an update on this table to replace only the characters 'é' or
'è' by a 'e'.
Thanks for your ideas
VooDoo


Reply With Quote
  #2 (permalink)  
Old 11-03-2005
Christian Kirsch
 
Posts: n/a
Default Re: char replacement

VooDoo wrote:
> Hi,
> I have a table with a field that contains a file path(www/docs/.../.../...)
> Some of the path contain this characters 'é' or 'è'.
> How can i do an update on this table to replace only the characters 'é' or
> 'è' by a 'e'.


Check the Fine Manual at dev.mysql.com/doc, section on string functions.
Reply With Quote
  #3 (permalink)  
Old 11-03-2005
VooDoo
 
Posts: n/a
Default Re: char replacement

thanks, i have read this section:
http://dev.mysql.com/doc/refman/4.1/...functions.html

I have found this:
mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww');
-> 'WwWwWw.mysql.com'

but the problem is that i don't know exactly the field. The path where i
need to change the c character is not always the same...

"Christian Kirsch" <ck@bru6.de> a écrit dans le message de news:
436a51b9$0$21941$9b4e6d93@newsread2.arcor-online.net...
> VooDoo wrote:
>> Hi,
>> I have a table with a field that contains a file
>> path(www/docs/.../.../...)
>> Some of the path contain this characters 'é' or 'è'.
>> How can i do an update on this table to replace only the characters 'é'
>> or
>> 'è' by a 'e'.

>
> Check the Fine Manual at dev.mysql.com/doc, section on string functions.



Reply With Quote
  #4 (permalink)  
Old 11-04-2005
Laurenz Albe
 
Posts: n/a
Default Re: char replacement

VooDoo <voodoonet38@free.fr> wrote:
> I have found this:
> mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww');
> -> 'WwWwWw.mysql.com'
>
> but the problem is that i don't know exactly the field. The path where i
> need to change the c character is not always the same...


Well, if the problem is indeterministic, you will neeed voodoo.

Yours,
Laurenz Albe
Reply With Quote
  #5 (permalink)  
Old 11-04-2005
VooDoo
 
Posts: n/a
Default Re: char replacement

;)
I sorted it out using php & an update.
Thanks
VooDoo
"Laurenz Albe" <invite@spam.to.invalid> a écrit dans le message de news:
1131093989.752711@proxy.dienste.wien.at...
> VooDoo <voodoonet38@free.fr> wrote:
>> I have found this:
>> mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww');
>> -> 'WwWwWw.mysql.com'
>>
>> but the problem is that i don't know exactly the field. The path where i
>> need to change the c character is not always the same...

>
> Well, if the problem is indeterministic, you will neeed voodoo.
>
> Yours,
> Laurenz Albe



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:09 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0