我用谷歌搜索并搜索了这个网站,但似乎没有任何效果,似乎它不喜欢我发现的所有内容的语法。虽然看起来很简单,但它变得令人沮丧。谁能帮忙?希望它使用我创建的 topRange 和 bottomRange 变量
ALTER PROCEDURE [dbo].[getTopFantasyPlayersByPositionSeason]
@top int,
@position varchar(3),
@topRange int,
@bottomRange int
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
IF @position = 'QB' OR @position = 'RB' OR @position = 'WR' OR @position = 'TE' OR @position = 'K' OR @position = 'D' OR @position = 'TE'
BEGIN
SELECT TOP (@top) *
FROM nflPassers_season
WHERE position=@position AND points > 0
ORDER BY points DESC
END
END