MySQL Forums
Forum List  »  Triggers

Re: Trigger to replace string
Posted by: Devart Team
Date: February 24, 2011 10:08AM

Try to apply this code into your task -

SET @s = 'SD:;ST:;DP:ttt;CP:0004321;SC;TP:ttt: ';
SELECT @pos:=LOCATE('CP:', @s) + 3, @len:=LOCATE(';', @s, @pos) - @pos, INSERT(@s, @pos, @len, '48222111444');

And create BEFORE UPDATE trigger.

Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/

Options: ReplyQuote


Subject
Views
Written By
Posted
6185
February 24, 2011 09:48AM
Re: Trigger to replace string
2183
February 24, 2011 10:08AM
2232
February 24, 2011 11:42AM
2382
February 25, 2011 06:19AM
1927
February 25, 2011 07:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.