Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. FreeText Search IN SQL SERVER 2005

FreeText Search IN SQL SERVER 2005

Scheduled Pinned Locked Moved Database
databasesql-servercomsysadminhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adnanrafiq
    wrote on last edited by
    #1

    Hi All, I have created of freetextsearch catalogue based on three columns of datatype nvarchar, col1,col2,col3 now i want to implement this type of logic in freetext search. If there there is a entery like , "visual C","some value","" Now if provide this type of syntaxe in query like Contains((col1,col2,col3),@Keyword) and parameter have visual it will return me this row, but if i provide like this "ual C" it will return no row. i want to implement this type of search "Logic should be so that if the typed in characters is contained anywhere in the course col1/col2/col3 it should be found. " Thanks if advance for help. Many Thanks & Best Regards, adnan

    Many Thanks, Adnan Rafiq muhammadadnanrafiq@gmail.com

    O 1 Reply Last reply
    0
    • A adnanrafiq

      Hi All, I have created of freetextsearch catalogue based on three columns of datatype nvarchar, col1,col2,col3 now i want to implement this type of logic in freetext search. If there there is a entery like , "visual C","some value","" Now if provide this type of syntaxe in query like Contains((col1,col2,col3),@Keyword) and parameter have visual it will return me this row, but if i provide like this "ual C" it will return no row. i want to implement this type of search "Logic should be so that if the typed in characters is contained anywhere in the course col1/col2/col3 it should be found. " Thanks if advance for help. Many Thanks & Best Regards, adnan

      Many Thanks, Adnan Rafiq muhammadadnanrafiq@gmail.com

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      adnanrafiq wrote:

      Contains((col1,col2,col3),@Keyword)

      Contains(col1,@Keyword) OR Contains(col2,@Keyword) OR Contains(col3,@Keyword)

      A 1 Reply Last reply
      0
      • O originSH

        adnanrafiq wrote:

        Contains((col1,col2,col3),@Keyword)

        Contains(col1,@Keyword) OR Contains(col2,@Keyword) OR Contains(col3,@Keyword)

        A Offline
        A Offline
        adnanrafiq
        wrote on last edited by
        #3

        Thanks for Reply, but it will not work for me. I want same behaviour from freetext serach using freetext or contains predicate, just like '%isual%', the syntaxt you provided will failed for me, For Example: let say have table name "table1" having one column "Col1" and table has these values visual C# C++ Adobe Photshop SQL Server Basic Language MY SQL HR Questions MBA (Marketing) Here is variable in Store Procedure: ------------------- DECLARE @KEYWORD NVARCHAR(MAX) SET @KEYWORD ='Visual'; SELECT * FROM TBALE 1 WHERE Contains(Col1,@KEYWORD) IT WILL RETURN ME Only one Row Visual -------------------- SET @KEYWORD ="visu"; SELECT * FROM TBALE 1 WHERE Contains(Col1,@KEYWORD) if i use this change the variale value to "visu" it wil return me no row --------------------------- SET @KEYWORD ="sual C#" ; SELECT * FROM TBALE 1 WHERE Contains(Col1,@KEYWORD) and if i again change value of vairable to "sual C#" then again no result. ----------------------------- I want result in these two cases,is the possible. Again THANKS IN ADVANCE Many Thanks, adnan

        Many Thanks, Adnan Rafiq muhammadadnanrafiq@gmail.com

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups