Search and Replace a word in memo field

2006-06-12 Thread Gabriel Mahiques

Hello friends.
In need your help.
I have a table with a field Name: Varchar(255).
In this field Name I have a detail and I need replace in all records a 
word for another.
For example: I have vhs and I want to change the word vhs for the 
word dvd in all records.

How can I do this?
--
Saludos cordiales.

Ing. Gabriel Mahiques
Dto. Control de Gestión
ELECTROINGENIERA S.A.
Telefono: 474 1414
Uspallata 1461. Barrio San Martín. CP: X5008HSH
Córdoba. República Argentina.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Search and Replace a word in memo field

2006-06-12 Thread Jo�o C�ndido de Souza Neto
update table set field=REPLACE(field, 'vhs', 'dvd');

Gabriel Mahiques [EMAIL PROTECTED] escreveu na mensagem 
news:[EMAIL PROTECTED]
 Hello friends.
 In need your help.
 I have a table with a field Name: Varchar(255).
 In this field Name I have a detail and I need replace in all records a 
 word for another.
 For example: I have vhs and I want to change the word vhs for the word 
 dvd in all records.
 How can I do this?
 -- 
 Saludos cordiales.
 
 Ing. Gabriel Mahiques
 Dto. Control de Gestión
 ELECTROINGENIERA S.A.
 Telefono: 474 1414
 Uspallata 1461. Barrio San Martín. CP: X5008HSH
 Córdoba. República Argentina. 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Search and Replace a word in memo field

2006-06-12 Thread Gabriel Mahiques
but I have a problem with this solution, because I have the words in the 
middle of  the phrase.
For example: Movie Kill Bill Vol 1 in vhs format, and I want to 
replace IT with Movie Kill Bill Vol 1 in dvd format.
In Another case I have: VHS Trade Konami. . and I want to replace with 
DVD Trade Konami.
so basically the word that I need to replace is located in the middle of 
the phrase.


João Cândido de Souza Neto escribió:

update table set field=REPLACE(field, 'vhs', 'dvd');

Gabriel Mahiques [EMAIL PROTECTED] escreveu na mensagem 
news:[EMAIL PROTECTED]
  

Hello friends.
In need your help.
I have a table with a field Name: Varchar(255).
In this field Name I have a detail and I need replace in all records a 
word for another.
For example: I have vhs and I want to change the word vhs for the word 
dvd in all records.

How can I do this?
--
Saludos cordiales.

Ing. Gabriel Mahiques
Dto. Control de Gestión
ELECTROINGENIERA S.A.
Telefono: 474 1414
Uspallata 1461. Barrio San Martín. CP: X5008HSH
Córdoba. República Argentina. 





  


--
Saludos cordiales.

Ing. Gabriel Mahiques
Dto. Control de Gestión
ELECTROINGENIERA S.A.
Telefono: 474 1414
Uspallata 1461. Barrio San Martín. CP: X5008HSH
Córdoba. República Argentina.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Search and Replace a word in memo field

2006-06-12 Thread Duncan Hill
On Monday 12 June 2006 14:16, Gabriel Mahiques wrote:
 but I have a problem with this solution, because I have the words in the
 middle of  the phrase.
 For example: Movie Kill Bill Vol 1 in vhs format, and I want to
 replace IT with Movie Kill Bill Vol 1 in dvd format.
 In Another case I have: VHS Trade Konami. . and I want to replace with
 DVD Trade Konami.
 so basically the word that I need to replace is located in the middle of
 the phrase.

That's what the string function replace() does.

Scanned by mailCritical.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Search and Replace a word in memo field

2006-06-12 Thread Gabriel Mahiques

Thanks friends.

Duncan Hill escribió:

On Monday 12 June 2006 14:16, Gabriel Mahiques wrote:
  

but I have a problem with this solution, because I have the words in the
middle of  the phrase.
For example: Movie Kill Bill Vol 1 in vhs format, and I want to
replace IT with Movie Kill Bill Vol 1 in dvd format.
In Another case I have: VHS Trade Konami. . and I want to replace with
DVD Trade Konami.
so basically the word that I need to replace is located in the middle of
the phrase.



That's what the string function replace() does.

Scanned by mailCritical.

  


--
Saludos cordiales.

Ing. Gabriel Mahiques
Dto. Control de Gestión
ELECTROINGENIERA S.A.
Telefono: 474 1414
Uspallata 1461. Barrio San Martín. CP: X5008HSH
Córdoba. República Argentina.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]