mysql: nesting a 'concat' within a 'replace'
Posted: Fri Oct 08, 2004 12:33 pm
hello;
I have the_table:
col_1 , col_2
-------------------------
aaa , aaa_do aaa_dat
the query that I am using:"update the_table set col_2=replace(col_2,col_1,concat('hoorah_' , col_1) ) "
I want
col_1 , col_2
-------------------------
aaa , hoorah_aaa_do hoorah_aaa_dat
however the query does not successfully stick the 'hoorah_' in front of the aaa_dat; instead I get this:
col_1 , col_2
-------------------------
aaa , hoorah_aaa_do aaa_dat
any thoughts?
thanks
Shannon Burnett
Asheville NC USA
I have the_table:
col_1 , col_2
-------------------------
aaa , aaa_do aaa_dat
the query that I am using:"update the_table set col_2=replace(col_2,col_1,concat('hoorah_' , col_1) ) "
I want
col_1 , col_2
-------------------------
aaa , hoorah_aaa_do hoorah_aaa_dat
however the query does not successfully stick the 'hoorah_' in front of the aaa_dat; instead I get this:
col_1 , col_2
-------------------------
aaa , hoorah_aaa_do aaa_dat
any thoughts?
thanks
Shannon Burnett
Asheville NC USA