Jacques Jocelyn wrote:

Hello mysql,

Something  I  have  been  thinking about without any clue on how I can
achieve it.
I know how to update a field with
"update table X set field1='My Text' where tableid = 1"

Now, say I have in a table X, the field1 with the value :
'I have been searching that functionalities for several days'
and I would like to replace 'functionalities' by 'functionality'

Would anyone knows how to replace JUST one word or a part of a text in
a field without using an external program ?


MySQL has a 'replace' function for this:
update table X set field1=replace(field1, 'functionalities', 'functionality') where tableid=1;


http://dev.mysql.com/doc/mysql/en/String_functions.html

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

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

Reply via email to