SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Need help in creating Stored Procedure for searching database


Need help in creating Stored Procedure for searching database

Author
Message
venu_ksheerasagaram
venu_ksheerasagaram
Old Hand
Old Hand (377 reputation)Old Hand (377 reputation)Old Hand (377 reputation)Old Hand (377 reputation)Old Hand (377 reputation)Old Hand (377 reputation)Old Hand (377 reputation)Old Hand (377 reputation)

Group: General Forum Members
Points: 377 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
dmoldovan
dmoldovan
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1494 Visits: 1479
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/
arun.sas
arun.sas
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2931 Visits: 3493
exec sp_MSforeachdb "select '?' As DatabaseName,name from ?.dbo.sysobjects where name like ('%MYTABLE%')" 


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search