I have a simple stored procedure.
-----------------------------------------------
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE sp_stproc1 @CurrentDay AS smalldatetime, @WhatDay AS smalldatetime AS
Just one select statment
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
---------------------------------------------
When I run the select statement only from the Query Analyzer, it takes about 4 mins to run.
When I execute the stored proc:
exec sp_stproc1 '2008-09-17', '2008-09-16'
it never comes back.
Anyone experienced similar problem ?????
Thanks.
-----------------------------------------------
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE sp_stproc1 @CurrentDay AS smalldatetime, @WhatDay AS smalldatetime AS
Just one select statment
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
---------------------------------------------
When I run the select statement only from the Query Analyzer, it takes about 4 mins to run.
When I execute the stored proc:
exec sp_stproc1 '2008-09-17', '2008-09-16'
it never comes back.
Anyone experienced similar problem ?????
Thanks.