我有以下存储过程,它工作正常,除了当返回所有结果时它会重新开始并创建另一个窗口,它会一遍又一遍地循环创建具有相同结果的表。这可能是什么原因造成的?
USE [HRLearnDev]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[COL_Run_DOM_Parameters]
@StartDate varchar (50),
@EndDate varchar (50)
AS
SET NOCOUNT ON
SELECT *
FROM dbo.COL_V_GEMS_DOM_FCT
WHERE REC_EFF_STT_DT BETWEEN @StartDate and @EndDate
ORDER BY REC_EFF_STT_DT DESC
EXECUTE COL_Run_DOM_Parameters @StartDate = "2010-03-05", @EndDate = "2011-06-11"