Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many parameters in a Stored Procedure? 3

Status
Not open for further replies.

RonRepp

Technical User
Feb 25, 2005
1,031
US
Hi all:

Is there a way to tell how many parameters are needed to pass into a Stored Procedure?

[code>>Sample]
CREATE PROC RR_Rescodes
(
@StartDate DATETIME,
@EndDate DATETIME
)

AS ...
[/code]

It's obvious that I need 2 here, but what if I couldn't see the SP itself?

Thanks,



Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.

My newest novel: Wooden Warriors
 
or....

Code:
Select * 
From   Information_Schema.Parameters 
Where  Specific_Name = 'RR_Rescodes'

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
you could do something like this.
Code:
-- For 2000
select Parameter_name from INFORMATION_SCHEMA.PARAMETERS
where Specific_name='RR_Rescodes'
and Parameter_name!=''

--For 2005
select * from sys.parameters
where object_id=object_id('RR_Rescodes')
and name !=''

Well Done is better than well said
- Ben Franklin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top