[ale] Help with a search and replace in mysql?
Richard Bronosky
Richard at Bronosky.com
Fri Jul 23 18:30:40 EDT 2010
You need to do an inner join update. If you reply with the result of
"SHOW CREATE TABLE <table-name>" for _both_ of the tables in the old
system, I can compose the query for you.
On 7/23/10, 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
>
--
Sent from my mobile device
.!# RichardBronosky #!.
More information about the Ale
mailing list