• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1036
  • Last Modified:

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

0
zephyr_hex (Megan)
Asked:
zephyr_hex (Megan)
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
update myTable
set [part number] = REPLACE([Part Number],'R','K')
WHERE [Part Number] like 'DV%R[0-9]%'
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now