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
 Pass null to stored proc in sql server mgmt

Author  Topic 

MyronCope
Starting Member

46 Posts

Posted - 2008-01-18 : 16:18:15
I'm in sql server mgmt 2005 and i highlighted a stored proc and clicked on "execute". I need to pass a null value in as the first param value to test this stored proc. what is the syntax, is below correct?

EXECUTE @RC = [SomeDataBaseName].[dbo].[sp_SomeStoredProcedure]
null
,'1234'
,1

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-01-18 : 16:23:11
Yes, it is. Are you getting any error?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-21 : 09:46:42
and if the sp donesnt have output parameters, then

EXEC [SomeDataBaseName].[dbo].[sp_SomeStoredProcedure] null,'1234',1

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-01-21 : 09:59:05
You mean a return value other than zero?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -