Answered by:
Creating a Stored Procedure to Implement a Full-Text Search

Question
Answers
-
Hi Visakh
The link what you share with me not helpful for me. I want bit more clear query
could please help me
Have you gone through his link clearly? What part you are missing or you didn't understand. Breaking a question into parts will make us to understand your problem. If you say just not clear, Sorry we cannot help you.
Few links might help you after you set full text index search as explained in visakh's blog
http://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-catalog-and-index/
- please mark correct answers
- Edited by Murali dhar Friday, May 09, 2014 2:06 PM
- Proposed as answer by Mike YinMicrosoft contingent staff, Moderator Thursday, May 15, 2014 7:27 AM
- Marked as answer by Mike YinMicrosoft contingent staff, Moderator Sunday, May 18, 2014 4:57 PM
-
http://searchsqlserver.techtarget.com/tip/Stored-procedures-Implement-full-text-search
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
- Proposed as answer by Mike YinMicrosoft contingent staff, Moderator Thursday, May 15, 2014 7:32 AM
- Marked as answer by Mike YinMicrosoft contingent staff, Moderator Sunday, May 18, 2014 4:58 PM
All replies
-
To use full-text search, you need to SET full-text index on the table first,
You use the CREATE FULLTEXT INDEX command to create full-text indexes
UseAdventurework2008;
CREATE FULLTEXT INDEX ON Person.Contact(Firstname) KEY INDEX pk_Contact_ContactID
In this example, Person.Contact is the name of the table you are full-text indexing, and
pk_Contact_ContactID is the Full-Text Search key. A Full-Text Search key must be a unique, non-nullable, single-column index that is not offline and has a maximum size of 900 bytes. Note that this full-text index is created on the default full-text catalog. Once again, if you do not have a default full-text catalog, you get the following message:
A default full-text catalog does not exist in database ‘AdventureWorks’ or user does not have permission to perform this action.
You specify a full-text catalog by using the following command:
UseAdventureWorks;
CREATE FULLTEXT INDEX ON Person.Contact (Firstname, Lastname)
KEY INDEX pk_Contact_ContactID ON MyCatalog
After creating the full-text index and full-text catalog as shown above you can create the stored procedure like this:
create Procedure [dbo].[usp_Search_Contact]
(
@FirstNameSearch varchar(50)
)
AS
set@FirstNameSearch = '"*' + @FirstNameSearch + '*"'
SELECTFirstName
FROMPerson.Contact
WHERE CONTAINS(FirstName, @FirstNameSearch);
I hope this helps a bit
- Edited by Abubeker Refaw Friday, May 09, 2014 6:06 AM
-
http://searchsqlserver.techtarget.com/tip/Stored-procedures-Implement-full-text-search
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
- Proposed as answer by Mike YinMicrosoft contingent staff, Moderator Thursday, May 15, 2014 7:32 AM
- Marked as answer by Mike YinMicrosoft contingent staff, Moderator Sunday, May 18, 2014 4:58 PM
-
Thanks for your reply could please explain bit more clear and explain with example query
and one more thing i cant execute in your query i'm getting error on that
- Edited by rmohan raj Friday, May 09, 2014 6:35 AM
-
-
-
-
Hi visakh
Example is there but i didn't understand clearly . I need bit more clear example could you please help me
Here's a more elaborate article on the same
https://www.outsystems.com/forums/discussion/8934/how-to-install-configure-and-use-full-text-search/
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
- Proposed as answer by Mike YinMicrosoft contingent staff, Moderator Thursday, May 15, 2014 7:31 AM
-
-
Hi Visakh
The link what you share with me not helpful for me. I want bit more clear query
could please help me
Have you gone through his link clearly? What part you are missing or you didn't understand. Breaking a question into parts will make us to understand your problem. If you say just not clear, Sorry we cannot help you.
Few links might help you after you set full text index search as explained in visakh's blog
http://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-catalog-and-index/
- please mark correct answers
- Edited by Murali dhar Friday, May 09, 2014 2:06 PM
- Proposed as answer by Mike YinMicrosoft contingent staff, Moderator Thursday, May 15, 2014 7:27 AM
- Marked as answer by Mike YinMicrosoft contingent staff, Moderator Sunday, May 18, 2014 4:57 PM