Reflections on Tech. Life
Tuesday, February 17, 2004
 
Here was a useful article I found on how to do a find and replace on SQL Server Text fields: Microsoft SQL Server - Search and Replace in a TEXT column - SQLTeam.com:


Here is the useful bit of SQL in question:
"declare @otxt varchar(1000)
set @otxt = 'ExistingText'

declare curs cursor local fast_forward
for
select
id,
textptr(TargetField),
charindex(@otxt, TargetField)-1
from
TargetTable
where
TargetField
like
'%' + @otxt +'%'"

Then this other sql makes the change.

declare @otxt varchar(1000)
set @otxt = 'ExistingText'

declare curs cursor local fast_forward
for
select
id,
textptr(TargetField),
charindex(@otxt, TargetField)-1
from
TargetTable
where
TargetField
like
'%' + @otxt +'%'
 
(0) comments
Friday, February 13, 2004
 
An interesting site with theory proposed by it's author for the explaination of everything Grand Unification & Time - Welcome
 
(0) comments
Observations about Technology by an Information Technology 20 yr Vet.

ARCHIVES
08/01/2003 - 09/01/2003 / 09/01/2003 - 10/01/2003 / 10/01/2003 - 11/01/2003 / 11/01/2003 - 12/01/2003 / 12/01/2003 - 01/01/2004 / 01/01/2004 - 02/01/2004 / 02/01/2004 - 03/01/2004 / 05/01/2004 - 06/01/2004 / 09/01/2004 - 10/01/2004 / 10/01/2004 - 11/01/2004 / 11/01/2004 - 12/01/2004 / 12/01/2004 - 01/01/2005 / 02/01/2005 - 03/01/2005 / 06/01/2005 - 07/01/2005 / 07/01/2005 - 08/01/2005 / 08/01/2005 - 09/01/2005 / 09/01/2005 - 10/01/2005 / 10/01/2005 - 11/01/2005 / 11/01/2005 - 12/01/2005 / 12/01/2005 - 01/01/2006 / 03/01/2006 - 04/01/2006 / 04/01/2006 - 05/01/2006 / 06/01/2006 - 07/01/2006 / 08/01/2006 - 09/01/2006 / 01/01/2007 - 02/01/2007 /


Powered by Blogger