[ale] Help with a search and replace in mysql?

Jerald Sheets questy at gmail.com
Fri Jul 23 12:14:58 EDT 2010


How about something like:


update *<tablename>* set system_num='*<number_you_want>*' where system_num='
*<number it is>';*


Is that what you're looking for?




---
Jerald M. Sheets jr.




On Fri, Jul 23, 2010 at 11:34 AM, david w. millians <millia at panix.com>wrote:

>
> Okay, I'm trying to fix a database issue. I have a table:
> users
> with fields
> last, first, etc.
> Of interest is the field system_num. In the old system, this was the ID
> field from another table, that pointed to the proper value. In the new
> system, that ID field is the proper value.
> So how do I do a search and replace? I did RTFM somewhat and discovered
> the replace function. It did replace, but also had the unintended
> consequence of messing things up since the replace is not for the whole
> field but is instead for any matching string in the field.
>
> How do you do this for the whole field?
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20100723/74562330/attachment.html 


More information about the Ale mailing list