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
 General SQL Server Forums
 New to SQL Server Programming
 Stored Procedure printout

Author  Topic 

ingineu
Yak Posting Veteran

89 Posts

Posted - 2005-09-21 : 12:06:54
The SQL forums search keeps timing out, so I'm not able to check whether this has been asked previously. Is there a query/sproc available that will return Stored Procedure lines for a given database? I would like to make this available for printing via Access.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-09-21 : 12:55:16
If you just want to print them out, then you can use the Generate SQL script wizard from Enterprise Manager. Other alternatives are syscomments and sp_help.

Tara
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-09-21 : 15:09:55
Enterprise Manager

Right Click on a dtabase icon

Choose All Tasks>Generate SQL Script

When you get the dialog, chose Show All

I wouldn't recommend the other methods.

Tara's just being thorough



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

ingineu
Yak Posting Veteran

89 Posts

Posted - 2005-09-21 : 16:39:53
Thanks for directing me, I setup the following stored procedure and referenced it in an access report:

SELECT sc.text, so.name, so.crdate
FROM dbo.syscomments sc INNER JOIN
dbo.sysobjects so ON sc.id = so.id
WHERE (LEFT(so.name, 2) = 'pr')
Go to Top of Page

ingineu
Yak Posting Veteran

89 Posts

Posted - 2005-09-21 : 16:52:36
Just trying out the SQL Script approach. Not that familiar with sql script files and Query Analyzer, but I Opened the script file and then did the following:

Query --> Execute

It said that it ran successfully. Ummm, happy it did, but how do I view the results?
Go to Top of Page

ingineu
Yak Posting Veteran

89 Posts

Posted - 2005-09-21 : 16:54:41
Oops .. helps to use the scrollbar.
Go to Top of Page
   

- Advertisement -