Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_fulltext_thesaurus_add_term

  No additional text.


Syntax
CREATE PROCEDURE sys.sp_fulltext_thesaurus_add_term
    @createNewState bit,
    @newstateid int,
    @parentid int,
    @phraseIdOrNull int,
    @term varbinary(132),
    @lcid int,
    @newStateCreated bit output,
    @duplicateThesaurusRule bit output
AS
BEGIN
    SET NOCOUNT ON

    DECLARE @stateid int
    DECLARE @existingPhraseId int

    SELECT @newStateCreated = 0
    SELECT @duplicateThesaurusRule=0

    if (@createNewState = 0)
    BEGIN
    SELECT @stateid = stateid, @existingPhraseId=phraseid
        FROM tempdb.sys.fulltext_thesaurus_state_table
        WHERE ( ( parentid = @parentid ) AND
                ( term = @term ) AND
                (lcid = @lcid) )
    END

    IF ( @stateid IS NULL )
    BEGIN
        INSERT INTO tempdb.sys.fulltext_thesaurus_state_table (stateid, parentid, phraseid, term, lcid )
            VALUES (@newstateid, @parentid, @phraseIdOrNull, @term, @lcid )

        SELECT @stateid = @newstateid
        SELECT @newStateCreated = 1

    END
    ELSE IF ( @phraseIdOrNull IS NOT NULL )
    BEGIN
        IF (@existingPhraseId IS NULL)
        BEGIN
            UPDATE tempdb.sys.fulltext_thesaurus_state_table
                SET phraseid = @phraseIdOrNull
                WHERE ( ( parentid = @parentid ) AND
                        ( term = @term ) AND
                        (lcid = @lcid) )
        END
        ELSE IF (@existingPhraseId IS NOT NULL)
        BEGIN
            -- Duplicate terminal phrase encountered in the thesaurus file
            -- Ignore duplicate phrase (no need to update state table)
            SELECT @duplicateThesaurusRule=1
        END
    END

    RETURN @stateid
END

 
Last revision 2008RTM
See also

  sp_fulltext_thesaurus_update (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash