469,609 Members | 1,652 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

Create Index via Stored Procedure?

Hi,

I am trying to create an index from a stored procedure. The stored procedure
runs without error, but when I try to use "CONTAINS" or "FREETEXT" on the
table, it tells me that I can't because the table is not indexed.

At the point of this code, a table called 'SearchCompareBase' is already
created and full of data. The syntax I am using to index that table follows.
Can anyone help me get it working:

CREATE INDEX SearchCompareBase_Index
ON SearchCompareBase (Word, Definition, POS, Category)

DECLARE @begin datetime
DECLARE @status int

SET @begin = CURRENT_TIMESTAMP
EXEC sp_fulltext_catalog 'SearchCompareBase_Index', 'start_full'

-- Wait for population to complete
SELECT @status = FullTextCatalogProperty('SearchCompareBase_Index',
'populatestatus')
WHILE (@status <> 0)
BEGIN
WAITFOR DELAY '00:00:01'
SELECT @status = FullTextCatalogProperty('SearchCompareBase_Index',
'populatestatus')
END
Thanks in advance for any help!
Jul 20 '05 #1
0 3637

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Trudie | last post: by
reply views Thread by HumanJHawkins | last post: by
2 posts views Thread by Mukesh | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.