Need SQL formula to modify column entries

Software SQL Server 2005.

I need a Sql formula to modify a column "FormType" that has several entries "Universal Workorders" that need to be changed to "Workorders".

Thanks for your help!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

Jim HornMicrosoft SQL Server Data DudeCommented:
Use the T-SQL REPLACE function to substitute fragments of text.
UPDATE YourTable
SET FormType = REPLACE(FormType, 'Universal Workorders', 'Workorders') 

Open in new window

If you "need" anything "else" either provide more "details" or let us "know".
dave_skyAuthor Commented:
This is what I tried in a query and it didn't execute correctly:

UPDATE [MonarchSQL].[dbo].[tblJobRecordDetail]
   SET FormType = REPLACE(FormType, 'Universal Workorders', 'Workorders')

Do I need to add some conditions?
Jim HornMicrosoft SQL Server Data DudeCommented:
Define 'didn't execute correctly'.  Was there an error message?  No error message but no rows affected?

Experts here can't connect to your data source and execute it ourselves, we can't read minds, and we'd prefer you give us more details so we don't have to make a lot of guesses.
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Jim HornMicrosoft SQL Server Data DudeCommented:
Next time do us a favor and do this so we can see everything in one view
Custom Image from a Screenshot
Jim HornMicrosoft SQL Server Data DudeCommented:
2,404 rows updated means that it worked.

The query has Universal Workorders, with an 's', and the column data is Universal Workorder without the 's', so the query would not update those values.

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
dave_skyAuthor Commented:
Thanks for your help! I really appreciate it.

Update tablename set formftype='Workorders' where FormType='Universal Workorders' be a straight forward and direct response
I.e. The above will return 0 rows affected because as pointed out the. Data In the column is different than specified in the query.?
The replace inclusion reflect every row was checked. And evaluated.
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 2005

From novice to tech pro — start learning today.