我有一个SQL Server存储过程,当我插入参数时没有返回任何数据...
ALTER PROCEDURE dbo.EncumBugSearch
@year datetime
AS
BEGIN
SET NOCOUNT ON;
select *
From dbo.BudgetEncumberedTbl as bet
where year(dateadd(month,-3,bet.be_dateposted)) = @year
order by be_dateposted desc
END
GO
然而,当我插入参数的数字(即2011)时,我没有返回任何内容,那么我得到了正确的结果......任何想法?