Home » Developer & Programmer » Forms » replace command in sql
replace command in sql [message #78317] Wed, 13 February 2002 03:42 Go to next message
Ben
Messages: 48
Registered: January 2000
Member
I am trying to update only 1 character in a column
Via a trigger so for example: 3compare I would like to replace the 3 with 4 so it will now be 4compare.
Can somebody tell me what syntax I have to use for the update? with the select is no problem :select replace(column name,'3','4') from table name how can i do it for update? Thanks in advance.
Re: replace command in sql [message #78318 is a reply to message #78317] Wed, 13 February 2002 04:01 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
update your_table
set column_name=replace(column name,'3','4')
where .....restriction goes here...
Re: replace command in sql [message #80515 is a reply to message #78317] Sat, 05 October 2002 18:29 Go to previous message
Zamir
Messages: 1
Registered: October 2002
Junior Member
This was really helpful. Here is an actual command if you want to replace text value in a field.

update table1
set table1.field1 =
replace ( table1.field1, 'find and replace this' , 'with this')
from table1, table2
where table1.field2 = table2.field2
and table1.field1 like '%find and replace this%'
Previous Topic: E-mail through Forms
Next Topic: Re: Installation of D2K(VER 5)
Goto Forum:
  


Current Time: Wed Apr 24 07:40:00 CDT 2024