Help with Find / Replace sql query

my query is below.  it works in the sense that it displays a correct list of Part Numbers that have changed.  however, when i re query the table to verify the changes, the table hasn't been updated.

i'm assuming i need an UPDATE somewhere in my query... i'm just not sure where.
thanks.
SELECT REPLACE(dbo.mytable.[Part Number],'R','K')
FROM dbo.mytable
WHERE [Part Number] like 'DV%R[0-9]%'

Open in new window

LVL 44
zephyr_hex (Megan)DeveloperAsked:
Who is Participating?
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
update myTable
set [part number] = REPLACE([Part Number],'R','K')
WHERE [Part Number] like 'DV%R[0-9]%'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.