This is a discussion on Create Index via Stored Procedure? within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi, I am trying to create an index from a stored procedure. The stored procedure runs without error, but ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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! |