| | |
Howto | mssql seach and replace?
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2006
Posts: 59
Reputation:
Solved Threads: 1
In my database, I have two tables: Forum and Files
Files have two fields. First one is FileID and second one is FileAddress.
FileId field is fine. but in FileAddress field I have a lot of urls. I want to just change certain parts of url. For example, instead of having http://ipaddress/FILEPATH
I want to chage that to http://domain.com/FILEPATH for about 400 data in the sql table. How do I do this?????
Files have two fields. First one is FileID and second one is FileAddress.
FileId field is fine. but in FileAddress field I have a lot of urls. I want to just change certain parts of url. For example, instead of having http://ipaddress/FILEPATH
I want to chage that to http://domain.com/FILEPATH for about 400 data in the sql table. How do I do this?????
•
•
Join Date: Jun 2006
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
In my database, I have two tables: Forum and Files
Files have two fields. First one is FileID and second one is FileAddress.
FileId field is fine. but in FileAddress field I have a lot of urls. I want to just change certain parts of url. For example, instead of having http://ipaddress/FILEPATH
I want to chage that to http://domain.com/FILEPATH for about 400 data in the sql table. How do I do this?????
You could use the stuff function e.g.
stuff( 'http://ipaddress/FILEPATH', 8, 9, 'domain.com')
this will replace from character 8 the 9 characters 'ipaddress' with 'domain.com'
but you would obviously replace the string to be modified with the field name
stuff( FileAddress, 8, 9, 'domain.com')
and you would obviously need to select the appropriate records
Regards
Rob
![]() |
Similar Threads
- Jscript Replace Function (ASP)
- ASP Replace Function.... (ASP)
- Find and Replace (Database Design)
- new windosw xp full install edition; won't replace existing Windows Me OS (Windows NT / 2000 / XP)
Other Threads in the MS SQL Forum
- Previous Thread: SQL 2005 upgrade questions
- Next Thread: problem with trigger
Views: 10634 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last autogrowth business connectingtodatabaseinuse count cursor data database dateadd datepart day" dbsize deadlock delete_trigger exploit getdate hack highperformancecomputing hpc hpcserver2008 ibm iis limit live loop maximum microsoft ms mssql multiple multithreading news number password permission position query reporting result security server services sets single source sql sql-injection sqlserver sqlserver2005 subtype supercomputing supertype tables uniqueid update view weekday





