Lexie
asked on
Stored procedure in the system table
Well,
I am just wondering how I can get the stored procedure out of the system tables. The reason for that is that every stored procedure starts with a heading with the purpose and author of it. So I would just like to filter this out of the stored procedure and create a document of it.
Lex van de Pol
I am just wondering how I can get the stored procedure out of the system tables. The reason for that is that every stored procedure starts with a heading with the purpose and author of it. So I would just like to filter this out of the stored procedure and create a document of it.
Lex van de Pol
ASKER
No, I'm not looking for the names but the content. For example, I have the following stored procedure:
-- Purpose: this is just a test
-- Author : just me
CREATE PROCEDURE proc_test AS
BEGIN
blabla
END
I would like to run a query to get the header out of this stored procedure.
-- Purpose: this is just a test
-- Author : just me
CREATE PROCEDURE proc_test AS
BEGIN
blabla
END
I would like to run a query to get the header out of this stored procedure.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, that was what I was looking for!
SELECT ProcName = o.Name, OwnerName = u.Name
FROM sysobjects o JOIN sysusers u ON u.uid = o.uid
WHERE type = 'P'
Cheers