9

I have 5000 plus records where I need to remove part of the value of a field

In all cases, the part I wish to remove is "Job Description - "

Hence update so that "Job Description - Doctor" becomes "Doctor"

So (I guess) I am looking to

UPDATE mytable 
    SET myfield = {some regex} 

where myfield like '%Job Description - %'

Any advice would be much appreciated

1 Answer 1

18

The answer is as follows:

UPDATE mytable 
  SET myfield = REPLACE(myfield, 'Job Description - ','');
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.