Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / July 2004

Tip: Looking for answers? Try searching our database.

Full text search and replace

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Gilman - 21 Jul 2004 06:31 GMT
Need to search through a database and remove references to a company from
it. Grrr!

How can I do this? Do I need to write a client script to load each offending
record, or can I do it with SQL?

Conceptually I want to do

REPLACE IN Resumes TEXT 'Company Name' WITH ''

This is a full text table.

whats the best approach?
Hilary Cotter - 21 Jul 2004 13:15 GMT
I'd try something like this:

declare @replacement varchar(200)
set @replacement='test'
update testtext
set textcol=
substring(textcol,1, patindex('%company%',textcol)-1)
+@replacement +
substring(textcol,patindex('%company%',textcol)+len('company'),datalength(te
xtcol)-patindex('%company%',textcol)+len('company'))
from testtext

Signature

Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html

> Need to search through a database and remove references to a company from
> it. Grrr!
[quoted text clipped - 9 lines]
>
> whats the best approach?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.