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
 SQL Server Development (2000)
 SQL -> stored proc parameter have a default value?

Author  Topic 

APM
Starting Member

1 Post

Posted - 2007-06-18 : 22:43:01
Hi,

I am trying to find out some data about a stored proc by creating a sql statement.

Currently I use the sysobjects + syscolumns to discover:
a. the parameters of a stored proc
b. the type of data it accepts

but I really want to be able to find out if the parameter has a default value (i.e. needs to be provided)

I have successfully achieve a + b by the following command


select *
from sysobjects
where xtype = 'P'

select *
from syscolumns
--where id = <put id here>


Anyone got any ideas on how to find out if the parameter in a stored proc has a default value?

Thanks

APM

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-06-18 : 23:24:54
I don't think this is possible without parsing the code for the proc, which is in syscomments.


elsasoft.org
Go to Top of Page
   

- Advertisement -