SuperCyber
Programmer
I am trying to build a WHERE clause within a store procedure. Depending on the int value passed to @ID (the employee id number) it looks to see if the value of empAdmin is "YES" or "NO". The problem is that the @RETURN_VALUE is not returning anything for @Admin, but the SP returns the correct value for the empAdmin column. Below is the SP and the Output, I'm running SQL 2000 any help would be greatly appreciated.
Alter Procedure sproc_getAdmin
@ID int
AS
declare @Admin varchar(3)
SELECT empAdmin FROM tblEmployees WHERE empID=@ID
SET @Admin = 'empAdmin'
RETURN @Admin
************************************************************
Running dbo."sproc_getAdmin" ( @ID = 6 ).
empAdmin
------------------------------------------------------
YES
(1 row(s) returned)
@RETURN_VALUE =
Finished running dbo."sproc_getAdmin".
Thanks,
Brian
Alter Procedure sproc_getAdmin
@ID int
AS
declare @Admin varchar(3)
SELECT empAdmin FROM tblEmployees WHERE empID=@ID
SET @Admin = 'empAdmin'
RETURN @Admin
************************************************************
Running dbo."sproc_getAdmin" ( @ID = 6 ).
empAdmin
------------------------------------------------------
YES
(1 row(s) returned)
@RETURN_VALUE =
Finished running dbo."sproc_getAdmin".
Thanks,
Brian