update a sql 2012 record by changing part of the records value

I have a sql 2012 database with different types of field values in one field. I need to rename those values so they equal what the values should be for that field.


Field Name is Repository_revisions
the value in that field is ORD_DS_1111111_DATE_02.pdf

I need to change this value to ORDERS_DOCKETSHEET_1111111_DATE_02.pdf.

There is over 10,000 records that I will need to change. I am fairly new to SQL 2012 and any help will be appreciated.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vitor MontalvãoMSSQL Senior EngineerCommented:
I can give you the command to update that single row but need to know what's the formula to provide a massive update command:
UPDATE tableNameHere
SET Repository_revisions='ORDERS_DOCKETSHEET_1111111_DATE_02.pdf'
WHERE Repository_revisions='ORD_DS_1111111_DATE_02.pdf'

Open in new window

ste5anSenior DeveloperCommented:

UPDATE  tableNameHere
SET     Repository_revisions = REPLACE(Repository_revisions, 'ORD_DS_', 'ORDERS_DOCKETSHEET_')
WHERE   Repository_revisions LIKE 'ORD_DS_%';

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
samiam41Author Commented:
Thanks Ste5an, works great.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.