
October 22nd, 2012, 07:25 AM
|
|
Problem Solver
|
|
Join Date: Jan 2001
Location: Stockholm, Sweden
|
|
And what is the error message that you get?
Could it be:
Code:
mysql> update MESSAGE_ACTIONS
-> SET
-> FORWARD_DETAILS = REPLACE ( FORWARD_DETAILS ' i ' , ' io ' )
-> WHERE
-> 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 ' )
WHERE
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:
Code:
update MESSAGE_ACTIONS
SET
FORWARD_DETAILS = REPLACE ( FORWARD_DETAILS, 'i' , 'io' )
WHERE
FORWARD_DETAILS LIKE '%i%'
|