May 24, 2002 at 9:19 am
In stored procedure this code cheked and work fine
SELECT *
FROM tb_table
WHERE (CONTAINS(*, 'query'))
bat this:
DECLARE @QS varchar(100)
SELECT @QS = 'query'
SELECT *
FROM tb_table
WHERE (CONTAINS(*, @QS))
make error on checking "Incorrect syntax near '@QS'"
what wrong????
May 24, 2002 at 6:39 pm
I dont see anything obviously wrong, according to the sample in BOL it would seem to be valid syntax:
DECLARE @SearchWord varchar(30)
SET @SearchWord ='Moon'
SELECT pr_info FROM pub_info WHERE CONTAINS(pr_info, @SearchWord)
I just tried a variation of that query on one our tables here on the site and it worked fine, with or without the outer set of parens. Do you have any other code in your procedure?
Andy
May 27, 2002 at 4:51 am
quote:
Do you have any other code in your procedure?Andy
It's test procedure, so no other code.
After installation latest service pack all work.
thanks.
May 27, 2002 at 6:17 am
Thanks for the follow up!
Andy
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy