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.
| 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 |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2005-09-21 : 15:09:55
|
| Enterprise ManagerRight Click on a dtabase iconChoose All Tasks>Generate SQL ScriptWhen you get the dialog, chose Show AllI wouldn't recommend the other methods.Tara's just being thoroughBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx |
 |
|
|
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.crdateFROM dbo.syscomments sc INNER JOIN dbo.sysobjects so ON sc.id = so.idWHERE (LEFT(so.name, 2) = 'pr') |
 |
|
|
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 --> ExecuteIt said that it ran successfully. Ummm, happy it did, but how do I view the results? |
 |
|
|
ingineu
Yak Posting Veteran
89 Posts |
Posted - 2005-09-21 : 16:54:41
|
| Oops .. helps to use the scrollbar. |
 |
|
|
|
|
|