Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need help in creating Stored Procedure for searching database Expand / Collapse
Author
Message
Posted Thursday, September 24, 2009 1:17 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, April 20, 2011 6:43 AM
Points: 99, Visits: 243
Hi Friends,

I am facing a problem in writing a stored procedure for searching entire database(All tables) when a word is given as input.

Please provide me your valuable suggestions. and the ways of the stored procedure to write.

Thank you in advance,


Venu Gopal.K
Software Engineer
INDIA
Post #793083
Posted Thursday, September 24, 2009 1:40 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 3:14 PM
Points: 364, Visits: 1,333
See if dynamic SQL is helpful - you can start at http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=DynamicSearch, however in my opinion the most valuable resource is http://www.sommarskog.se/dynamic_sql.html#Dyn_DB.
Explore also the full text feature - BOL is a good starting point.
This article may also interest you:
http://www.sqlservercentral.com/articles/Full-Text+Search+(2008)/64248/
Post #793089
Posted Thursday, September 24, 2009 4:00 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 19, 2012 10:25 PM
Points: 1,229, Visits: 3,483
exec sp_MSforeachdb "select '?' As DatabaseName,name from ?.dbo.sysobjects where name like ('%MYTABLE%')" 

Post #793139
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse