|
Posted by Bonge Boo! on 09/28/47 11:24
On 18/8/05 10:29, in article BF2A1370.A7C27%bingbong@spamcop.net, "Bonge
Boo!" <bingbong@spamcop.net> wrote:
> This is probably really obvious, but I can't find a quick answer.
>
> I want to be able to do a "search and replace" style spelling correction on
> a column because I have spelt a word incorrectly. However I don't know the
> correct syntax for the SET command. If I use SET colname = %goodword% I
> simply replace the entire column with %goodword%
>
>
> UPDATE tbl_products SET product_name = "%goodword%" WHERE product_name LIKE
> "%badword%"
>
> Anyone help my poor brain out?
Ok. Sussed it out.
UPDATE tbl_products SET product_name = REPLACE(product_name, 'badword',
'goodword');
Navigation:
[Reply to this message]
|