distal-attribute
distal-attribute
distal-attribute
distal-attribute

Changing entire columns

stjernerlever posted 1 year ago in Feature discussion
Is there a function allowing the change of an entire column?

For example, I filter my search to hit all entries with the word 'one'. I want to change all of them to contain the word 'two'. There are over 2000 and I do not want to do it manually one by one.

How do I change them all at the same time?

Thanks alot, have a really good day!
jfalch posted 1 year ago
UPDATE myTable
SET myField=REPLACE(myField,"one","two")
WHERE myField LIKE "%one%"
stjernerlever posted 1 year ago
Thanks! Trying....
stjernerlever posted 1 year ago
It worked! Although it might have hit 400 entries more than intended :P But I made sure to back up, so I'll be playing a little with this.
I should have asked so much earlier, man this is a time saver! Thanks alot J. Falch!
jfalch posted 1 year ago
for more control, read up on using RLIKE in the WHERE clause.

if you have rights to modify the server´s configuration, for even more control download and install the PREG_xxx PCRE UDF´s, and use e.g. PREG_RLIKE() in the WHERE clause; you will also have to read up on regular expressions in this case.

Please login to leave a reply, or register at first.