Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHI I have a database with a string as one of the fields and I need to modify only a portion of the string. For example below is a record in the database old string server1/folder1 want to change to server2/folder1 -- Paul G Software engineer.
Post Follow-up to this messageREPLACE is one good option. Here is an example: create table #test111 (scode int, sdesc varchar(30)) insert into #test111 values (1,'server1/folder1') insert into #test111 values (2,'server1/folder1') update #test111 set sdesc = replace(sdesc,'serve r1/','server2/') where scode = 1 select * from #test111 "Paul" wrote: > HI I have a database with a string as one of the fields and I need to modi fy > only a portion of the string. For example below is a record in the databa se > > old string > server1/folder1 > want to change to > server2/folder1 > -- > Paul G > Software engineer.
Post Follow-up to this messageok thanks for the information -- Paul G Software engineer. "Absar Ahmad" wrote: > REPLACE is one good option. Here is an example: > > create table #test111 > (scode int, > sdesc varchar(30)) > > insert into #test111 values (1,'server1/folder1') > insert into #test111 values (2,'server1/folder1') > > update #test111 set sdesc = replace(sdesc,'serve r1/','server2/') > where scode = 1 > > select * from #test111 > > "Paul" wrote: >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread