There is a function in SQL 2008 which does this.
In SQL 2000 and 2005 you have to do something like this:
create table NoiseWords(pk int not null identity primary key, NoiseWord
varchar(100))
GO
insert into NoiseWords
exec master.dbo.xp_cmdshell'type %windir%\system32\noise.eng'
GO
delete from NoiseWords where noiseword is null
GO
delete from NoiseWords where noiseword like 'a b%'
GO
declare @counter int
set @counter=97
while @counter<97+26
begin
insert into NoiseWords (noiseword) values(char(@counter))
select @counter=@counter+1
end
GO
declare @searchPhrase varchar(max)
set @SearchPhrase= char(32)+'this is a sample of what I want to find'
select @SearchPhrase=replace(@SearchPhrase, ' '+noiseword+' ',' ') from
noisewords
select @SearchPhrase
GO
> Given a search string of "this is a sample of what I want to find" for
> example, I want to know what sql fts actually searched for- i.e. the
[quoted text clipped - 4 lines]
> Thanks!
> Jeff
ujjc001@gmail.com - 17 Apr 2008 18:27 GMT
Exactly what I was looking for. Going to try this now. Thank you.
Jeff