Solved

Update a part of a field.

Posted on 2011-09-02
2
285 Views
Last Modified: 2012-05-12

I want to change the end part of the filename
from:
0000229_0.pjpeg
to:
0000229_0.jpg

How do I do this? I know this won't:

UPDATE Nop_Product
SET AdminComment = 'jpg'
WHERE AdminComment = 'pjpeg'

thanks
0
Comment
Question by:MikeMCSD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
pivar earned 500 total points
ID: 36476150
Hi,

Try


UPDATE Nop_Product
SET AdminComment = REPLACE(AdminComment, '.pjpeg', '.jpg')
WHERE AdminComment LIKE '%.pjpeg'


/peter
0
 
LVL 16

Author Comment

by:MikeMCSD
ID: 36476178
perfect, . .  thank you
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question