Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

any easy way to modify string in dbase
HI 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Paul
11-29-05 04:23 PM


RE: any easy way to modify string in dbase
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:

> 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Absar Ahmad
11-29-05 06:23 PM


RE: any easy way to modify string in dbase
ok 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:
> 

Report this thread to moderator Post Follow-up to this message
Old Post
Paul
11-29-05 06:23 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:18 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006