String manipulation in stored procedures (MySQL 5.1)
-
Hello, I need to write a stored procedure in MySQL that loops through all rows in a table (the column types are TEXT and VARCHAR) and replaces certain characters in the column values with another character. For example, a certain column contains the text "ababa" and I want to change it to "acaca". I can't quite figure out the part about replacing a character in a string with another and could use some help with this! Thank you! Sylv
-
Hello, I need to write a stored procedure in MySQL that loops through all rows in a table (the column types are TEXT and VARCHAR) and replaces certain characters in the column values with another character. For example, a certain column contains the text "ababa" and I want to change it to "acaca". I can't quite figure out the part about replacing a character in a string with another and could use some help with this! Thank you! Sylv
-
Hello, I need to write a stored procedure in MySQL that loops through all rows in a table (the column types are TEXT and VARCHAR) and replaces certain characters in the column values with another character. For example, a certain column contains the text "ababa" and I want to change it to "acaca". I can't quite figure out the part about replacing a character in a string with another and could use some help with this! Thank you! Sylv
Sylv33 wrote:
loops through all rows in a table
The engine should do that; you shouldn't.