Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL Script

Author  Topic 

sedailey
Starting Member

1 Post

Posted - 2010-06-02 : 14:31:54
Need help on a SQL Script. We have a table in SQL database for example parts. Will the person enter about 100 parts name wrong and we need to change them with a script.

For example:

SC-40-SIL should be SC-40-FRE-SF

How can I do a script that says find this part number and change it to this number and it will change it in all the history files also?

Thanks in advance for your help.

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-06-02 : 14:33:09
UPDATE <urtable>
SET <urfield> = REPLACE(<urfield>,'-SIL','-FRE-SF')
WHERE <urcondition>
Go to Top of Page
   

- Advertisement -