Selon Brian Dunning <[EMAIL PROTECTED]>: > Hi all - > > I have an urgent need to update several million records. There is a > URL stored in a MySQL 'text' field. Many of the records contain > "1234" like this: > > http://www.domain.com?etc=etc&arg=1234&etc=etc > > Any occurence of "1234" has to be changed to "5678" like this: > > http://www.domain.com?etc=etc&arg=5678&etc=etc > > ...without changing the rest of the string. I'm hoping it's possible > to make this update to the entire table with a single SQL > statement???? If so I have no idea how to create it. Any help > appreciated. :) > > - Brian > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > >
Hi, update TABLE set field=replace(field,'=1234','=5678'); that's it. Hope that helps :o) Mathias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]