one more point SQL 2005 does interpolation, so this will work
declare @searchTerm varchar(200)
set @searchTerm="microsoft"
SELECT * FROM tblPages,
FREETEXTTABLE(tblPages, *,@searchTerm)searchTable
WHERE [Key] = tblPages.PageID ORDER BY RANK DESC
In previous versions of SQL Server you would have to do something like this
declare @searchTerm varchar(200)
set @searchTerm="microsoft"
declare @searchphase varchar(2000)
select @searchphrase= "SELECT * FROM tblPages,FREETEXTTABLE(tblPages, *,"
+char(39) +char(34)+ @searchphrase
select @searchphrase=@searchphrase+ char(34)+char(39)+")searchTable WHERE
[Key] = tblPages.PageID ORDER BY RANK DESC"
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com [quoted text, click to view] "Marc" <marc.birkett@gmail.com> wrote in message
news:1121073540.588455.25420@z14g2000cwz.googlegroups.com...
>
> Hello.
>
> I am having a problem with fulltext search whereby it always returns no
> data. I have enabled full text search on the table and successfully
> created a catalogue, which according to the event log has been
> populated.
>
> I have tested with this query (found in this group) via Query Analyzer:
>
> select FulltextCatalogProperty(N'resourceFile', N'PageID')
>
> Which returns null (which i believe is correct).
>
> The query i am using is:
>
> SELECT * FROM tblPages,
> FREETEXTTABLE(tblPages, *,@searchTerm)searchTable
> WHERE [Key] = tblPages.PageID ORDER BY RANK DESC
>
> Which i also believe is correct. Anyone any ideas?
>
> On an unrelated (or possibly related) subject, i also often get this in
> my error logs - anyone know how to fix?
>
> 17052 : This SQL Server has been optimized for 8 concurrent queries.
> This limit has been exceeded by 1 queries and performance may be
> adversely affected.
>
> Thanks.
>
> marc
>