October 22nd, 2012, 07:25 AM
And what is the error message that you get?
Could it be:
mysql> update MESSAGE_ACTIONS
-> FORWARD_DETAILS = REPLACE ( FORWARD_DETAILS ' i ' , ' io ' )
-> FORWARD_DETAILS LIKE ' %i% ';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL serv
er version for the right syntax to use near '' i ' , ' io ' )
FORWARD_DETAILS LIKE ' %i% '' at line 3
And by looking and stepping through this code I can see that:
1. You don't have a comma between the column name FORWARD_DETAILS and the 'i'.
2. You have spaces between the ' sign and the letter i and the letters io, which means that mysql is right now trying to replace the string '(space)i(space)' with the string '(space)io(space).
3. You have spaces inside the string in LIKE also.
So try this instead:
FORWARD_DETAILS = REPLACE ( FORWARD_DETAILS, 'i' , 'io' )
FORWARD_DETAILS LIKE '%i%'