Stored Proc that returns a value
Hi,
Is there a way to create a Store Proc that returns a non-integer value? e.g.
ALTER PROCEDURE dbo.spGetProjectDateOfWeek
( @ProjectID nvarchar(10),
@BatchCode nvarchar(10),
@WeekNo int,
@DateOfWeekN datetime OUTPUT
)
AS
SELECT @DateOfWeekN = DateOfWeekN FROM ProjectDateOfWeekTable
WHERE ProjectID = @ProjectID
AND BatchCode = @BatchCode
AND WeekNo = @WeekNo
I would like the stored proc to return the @DateOfWeekN. I tried this code but it doesn't return any value.
When I used "RETURN @DateOfWeekN", @DateOfWeekN must be integer. This returns an integer value and not the actual date of @DateOfWeekN. I would like the actual date to be returned by the stored proc not the integer type.
Thanks so much in advance!
|