/*
	Insert your copyright notice here, if applicable
*/

/*
	Comments  : Find the Person's name by their ID value.
	Returns   : 0 - Process completed successfully
		    1 - Process did not complete successfully
	Created   : 2004.07.21 RM
	Modified  : 
*/

CREATE PROCEDURE stpGetPersonNameByID
(
	@PersonID int, 
	@ReturnValue int OUTPUT
)

AS

DECLARE	@ReturnStatus int
SET 	@ReturnStatus = 0


-- Get requested data
------------------------------------------------------------
SELECT	[PersonID], [PersonName]
FROM	[Person]
WHERE	[PersonID] = @PersonID


-- Did an error occur?
------------------------------------------------------------
IF @@ERROR <> 0
SET @ReturnStatus = 1


-- Send return value back to calling procedure
------------------------------------------------------------
SET @ReturnValue = @ReturnStatus
GO