FreeText Search IN SQL SERVER 2005
-
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
-
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
-
adnanrafiq wrote:
Contains((col1,col2,col3),@Keyword)
Contains(col1,@Keyword) OR Contains(col2,@Keyword) OR Contains(col3,@Keyword)
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