FULL TEXT CONTAINSTable query NOT working.

  • Hi , I have applied FULL TEXT search option to my table , but it is not working in dynamic queries. Please help me out.

    select @RowNum = Count(*) From [dbo].[RUN_STAT_ERROR] --get total number of record

    WHILE @RowNum > 0 --loop until no more records

    BEGIN

    --print @RowNum

    select @ERROR_DESCR = '''"' + ERROR_DESCR + '"''' from [RUN_STAT_ERROR] where MLR_RUN_STAT_ERROR_ID = @RowNum --get other info from that row

    --print @ERROR_DESCR --do whatever

    --print @ERROR_DESCR

    set @sql = 'insert into Temp_Search(BLOB_FILE_CONTENT)

    select BLOB_FILE_CONTENT from [dbo].[TEMP] AS A

    INNER JOIN

    CONTAINSTABLE(TEMP, BLOB_FILE_CONTENT, '+ @ERROR_DESCR +'

    ) AS K

    ON A.AL_BLOB_FILE_CONTENT_ID = K.'

    print @sql

    EXEC sp_executesql @sql

    set @RowNum = @RowNum - 1 --decrease count

    END

    SELECT * from Temp_Search

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply