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 |
dthatcher
Starting Member
2 Posts |
Posted - 2012-10-11 : 08:53:09
|
I have created the following stored procedure:USE NorthwindGOCREATE PROC spCheckContact@cst nchar(5),@TitleName varchar(10) OUTPUTAS{remainder of my sproc; deleted to prevent plagiarism}When I attempted to run it like this:EXEC spCheckContact 'ALFKI'I get this error:Msg 201, Level 16, State 4, Procedure spCheckContact, Line 0Procedure or function 'spCheckContact' expects parameter '@TitleName', which was not supplied.But @TitleName is specified as an OUTPUT parameter! How can I fix this? |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-10-11 : 09:18:46
|
Try it.........DECLARE @tit_name varchar(30)EXEC spCheckContact 'ALFKI', @tit_name OUTPUTPRINT @tit_name--Chandu |
|
|
dthatcher
Starting Member
2 Posts |
Posted - 2012-10-11 : 09:34:56
|
Ah... so the output variable has to be supplied at execution. Thank you, that worked! |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-10-11 : 09:36:07
|
quote: Originally posted by dthatcher Ah... so the output variable has to be supplied at execution. Thank you, that worked!
Welcome--Chandu |
|
|
|
|
|