我有一个存储过程,可以从临时表中返回值。但是在我的DBML中,它显示的返回类型是(None)。如何让它识别出我的临时表中的列?
CREATE PROCEDURE [dbo].[GetCategoryPriceRanges]
@CategoryId int
AS
BEGIN
DECLARE @MinPrice money, @MaxPrice money
SELECT @MinPrice = MIN(ourPrice),@MaxPrice = MAX(ourPrice)
DECLARE @loopCatch int
--catch infinite loops
SELECT @loopCatch = 1
WHILE @thisLow <= @maxPrice AND @loopCatch < 100
BEGIN
INSERT INTO #prices(lowRange, hiRange) VALUES (@thisLow, @thisHigh)
SET @thisLow = @thisHigh + 1
SET @thisHigh = 2 * @thisLow - 1
SELECT @loopCatch = @loopCatch + 1
END
SELECT * FROM #prices
DROP TABLE #prices
END