Re: Is is possible to update a column based on a REGEXP on another column?

2011-01-24 Thread Johan De Meersman
If the bracketed stuff really can be anything, you're better off doing it externally, I guess. If you can be reasonably sure that there'll not be any square brackets in there, you can fluff about with instr() and substr(). On Sat, Jan 22, 2011 at 6:18 PM, Eric Bergen eric.ber...@gmail.com wrote:

Re: Is is possible to update a column based on a REGEXP on another column?

2011-01-22 Thread Eric Bergen
There isn't a built in way but you can try http://www.mysqludf.org/lib_mysqludf_preg/ I would go with the php/perl script if this is a one time thing. -Eric On Jan 21, 2011, at 11:31 AM, Phil pchap...@nc.rr.com wrote: I have a table which contains a username column which may be constructed

Is is possible to update a column based on a REGEXP on another column?

2011-01-21 Thread Phil
I have a table which contains a username column which may be constructed something like somename[A] or [DDD]someothername The A or DDD can be anything at all. I've added a new column to the table to which I'd like to populate with the value within the square brackets. I