cloudsurferuk Posted May 15, 2010 Share Posted May 15, 2010 ok, I have a database table called daysofweek which contains 1234 for example, what SQL command could I run to replace the existing content with 0123456 in ALL the entries (about 30000 hence the need to automate the process lol) Your help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/201880-bulk-replace-database-field-data/ Share on other sites More sharing options...
CodeMaster Posted May 15, 2010 Share Posted May 15, 2010 This should do the trick UPDATE daysofweek SET value = REPLACE(value,'01234', '0123456'); And Google is your friend http://www.google.nl/search?hl=nl&source=hp&q=sql+replace&aq=f&aqi=g10&aql=&oq=&gs_rfai= Quote Link to comment https://forums.phpfreaks.com/topic/201880-bulk-replace-database-field-data/#findComment-1058822 Share on other sites More sharing options...
cloudsurferuk Posted May 15, 2010 Author Share Posted May 15, 2010 yeah cheers, was having a blonde moment, it came to me after i Posted. Thanks for the reply though. Quote Link to comment https://forums.phpfreaks.com/topic/201880-bulk-replace-database-field-data/#findComment-1058942 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.