Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Procedure for finding out the Word Given as Input.

Author  Topic 

MohanSQL
Starting Member

1 Post

Posted - 2005-08-03 : 18:09:37
Hi,
I'm trying to Create a Procedure for finding out the word given as Parameter to the SP.
The Concept is;
"To find out the SPs with the Name starts like 'abc' and get the Helptext of every result.
From the helptext of each resulting SP, i'm trying to find out the word given as the Other parameter like this:
exec search_sp 'moh', 'insert'
exec search_sp @starting_letters, @word_tobefound"

In this how can i store the SPs helpetext in variable or file and check one by one for the Search Word, in the Parameter?

If anybody interested in this Idea, can revert back.
Thanks.



Mohan Jayaraman,
Chennai,
India.

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-08-03 : 22:58:29
save the result of the helptext in a temporary table variable, then you can search that table


somewhat like:
insert #temp exec sp_helptext 'objName'

HTH

--------------------
keeping it simple...
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-04 : 01:16:39
Is this?

select routine_definition from information_schema.routines
where routine_name='spname' and routine_definition like '%' + @searchString +'%'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -