Link to home
Start Free TrialLog in
Avatar of samiam41
samiam41Flag for United States of America

asked on

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.

Example:

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.
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

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

ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of samiam41

ASKER

Thanks Ste5an, works great.