Please help me write mass replace query.

ZaiDa's profile image ZaiDa posted 4 months ago in General Permalink

Hello. I have a table called shift records where each column is named each month of the year and 1 extra column called employee numbers.
So I would, for example, like to change all the entries under February named Shift1 to like Shift2, but only in the rows where the Employee num column starts with for example 330...

Following other threads it would look like this.

UPDATE Shift Records SET February=REPLACE(February, 'from"t1"', 'to"t2"') WHERE Employee Numbers INCLUDE '330'

Honestly it looks wrong to me. Please help. Also, what is the best way to back the table up? Do I need to select the drop option when exporting as sql? Any help would be appreciated.

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