Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using TRANSLATE, REPLACE, DECODE with UPDATE

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
Wonder if anyone can help?
I'm wanting to perform some simple search/replace operations on data. This is simple enough using TRANSLATE and REPLACE in a SELECT statement ... however ... how do I actually UPDATE the data?
I've tried using a SELECT within the UPDATE, but this doesn't work as the results return more than 1 value.

Example:

select
TRANSLATE(cmp_nam,'.',' '),
TRANSLATE(lst_nam,'.',' ')
from NAMES;

Cheers
 
You can try sometthing like this
Update mwebwork
set Work_Description = REPLACE(work_description,'1','phase n')
where Work_ID >500 and work_id <650
GO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top