P
Paul
Hi,
I could'nt see any SQL message group on MSDN so this is
the closest group.
I have a Stored Procedure that takes a UserName as a
paramater and returns 1 if found and 0 if not found.
However, when I execute my SPROC through SQL Analyser it
executes fine but does not return a value.
The only way I can get it to return teh value in SQL
Analyser is to SELECT @Found rather than a return @Found
statement.
CREATE PROCEDURE dbo.CHECK_USER
@UserName varchar(25)
As
DECLARE @Found Int
IF EXISTS(
Select UserName from CalcUser
where UserName = @UserName
)
set @Found = 1
ELSE
set @Found = 0
SELECT @Found
GO
I could'nt see any SQL message group on MSDN so this is
the closest group.
I have a Stored Procedure that takes a UserName as a
paramater and returns 1 if found and 0 if not found.
However, when I execute my SPROC through SQL Analyser it
executes fine but does not return a value.
The only way I can get it to return teh value in SQL
Analyser is to SELECT @Found rather than a return @Found
statement.
CREATE PROCEDURE dbo.CHECK_USER
@UserName varchar(25)
As
DECLARE @Found Int
IF EXISTS(
Select UserName from CalcUser
where UserName = @UserName
)
set @Found = 1
ELSE
set @Found = 0
SELECT @Found
GO