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
 Working with Return Vallues

Author  Topic 

edb2012
Starting Member

19 Posts

Posted - 2012-01-31 : 15:35:37
Hi Everyone,
I want to make a dummy stored procedure that grabs my value from a typical ASP web page (which is 4 for example) and change it in a Stored Procedure to a 1 return value.

Here is my Stored Procedure but it breaks.

CREATE procedure dbo.tdlproc_ProcessInteger

@IsEnrolled Integer Output


as

@IsEnrolled = '1' ---- this line does not work in this Stored Procedure

return @IsEnrolled
GO

Can someone help me with this :).

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2012-01-31 : 15:39:34
Set @isenrolled = 1....... should do it


Duane.
Go to Top of Page

edb2012
Starting Member

19 Posts

Posted - 2012-01-31 : 15:56:07
Nope ... I get an error from sql


Error 170 Incorrect Syntax

I am fighting this situation to get a return value in a stored procedure without a select statement. The reason is because my select statement is a COUNT and does return a value of 1.

The problem has to do with this cotton-picking integer AIsEnrolled
Go to Top of Page

edb2012
Starting Member

19 Posts

Posted - 2012-01-31 : 16:11:00
Thanks Duane ... I forgot to add 'set' and it works.

Need a new pair of eyes or a debugger system in my head.
Go to Top of Page
   

- Advertisement -