I want to update 160 records in a table. The field contains a variable value
and a constant prefex like
'constant: unique value for this record'
Is there such an UPDATE statement that would update this field into
'unique value for this record'
They way I would do it otherwise is using Perls regular expressions like
(this is rather pseudocode just to make the point)
$foo = 'constant: unique value for this record';
$foo =~ s/constant:(.+)//sg;
$bar = $1; #(and hopefully $1 would hold 'unique value for this record')
UPDATE my_table
SET field = $bar
WHERE field = $foo;
Any ideas? Help greatly appreciated.
Hannes
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php