Find and replace multiple update in same colum

Copper Contributor

Ho I can find and replace of costallow, Monthly and share of column-Add_code_claculation using SELECT command. I want to update costallow to 10, Monthly to 15 and Share to 30 using find and replace function using SELECT or any other function to get the expected result.

 

Create table #ABC ( Tid char(10), Add_code_Calculation varchar(255))

insert into #ABC values ('11','(A+B+C)/(costallow * Monthly - Share)'

 

Expected result:

Tid         Add_code_Calculation

11          (A+B+C)/(10 * 15 - 30)

1 Reply

@Martin_Kevin , not very clear, but if you want to replace content, use

REPLACE (Transact-SQL) - SQL Server | Microsoft Learn