Search in Stored Procs

Share your SQL code snippets for SQL Prompt!

Moderators: David Atkinson, Anu Deshpande, Luke Jefferson, Paul Stephenson

Search in Stored Procs

Postby atomicbomb » Thu Feb 14, 2008 5:18 am

Description: Searches the contents of Stored Procs for a given phrase

Shortcut: ssp (Search Stored Procs)

Code:

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '{%}foobar{%}'
atomicbomb
 
Posts: 2
Joined: Thu Feb 14, 2008 5:14 am

Variation

Postby rjpaulsen » Wed Mar 12, 2008 7:49 pm

This is the one I use:

Code: Select all
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%$CURSOR$%'
AND ROUTINE_TYPE='PROCEDURE'
ORDER BY [ROUTINE_NAME]
rjpaulsen
 
Posts: 35
Joined: Fri Jul 21, 2006 9:55 pm


Return to SQL Prompt code snippets

Who is online

Users browsing this forum: No registered users and 0 guests

cron