Hello everyone,
It's been a pain to find some helpful tips on T-SQL on the web. I finally came to the thought of the forum, I hope this will help me out.
Here is the headache that I have had for three days now (Or maybe I am stupid enough not to get the problem solved...well)
I am trying to write a freetexttable Stored Procedure, however; it(query analyzer) tells me that there's an incorrect syntax error......
Here is the SP:
CREATE PROCEDURE fulltextsearch
(
@Text1 VARCHAR(8000)
)
AS
declare @sql varchar(8000)
set @sql = 'SELECT Rank, Text1'
set @sql = @sql + 'FROM Articles INNER JOIN freetextTABLE(Articles,Text1,''" '+@Text1+' "'')
AS SR
on ID=[Key]
order by Rank desc'
exec(@sql)
Can anyone tell me what's wrong with it? Your help and your time is highly appreciated.
I have already added a primary key on the table, made the index table, catelog.
Pleae let me know what's wrong.....thank you very much.
Sandy
It's been a pain to find some helpful tips on T-SQL on the web. I finally came to the thought of the forum, I hope this will help me out.
Here is the headache that I have had for three days now (Or maybe I am stupid enough not to get the problem solved...well)
I am trying to write a freetexttable Stored Procedure, however; it(query analyzer) tells me that there's an incorrect syntax error......
Here is the SP:
CREATE PROCEDURE fulltextsearch
(
@Text1 VARCHAR(8000)
)
AS
declare @sql varchar(8000)
set @sql = 'SELECT Rank, Text1'
set @sql = @sql + 'FROM Articles INNER JOIN freetextTABLE(Articles,Text1,''" '+@Text1+' "'')
AS SR
on ID=[Key]
order by Rank desc'
exec(@sql)
Can anyone tell me what's wrong with it? Your help and your time is highly appreciated.
I have already added a primary key on the table, made the index table, catelog.
Pleae let me know what's wrong.....thank you very much.
Sandy