Free Jobs
Reference




Dot Net Forums: ASPNET (77) C#.NET (39) VB.NET (8) AJAX (21) Silver Light (1) WCF (10) WPF (1) WWF (1) .NET 3.5 (3) SQL SERVER (38) Other (3)

Topic: how to test exec stored procedure with parameter datetime

To get the Posted Questions details daily in your mail Click Here

Share this Post on Facebook/Twitter/Orkut Bookmark and Share





User: sonam777 Post Date: 16 Oct 2011 06:29

Introduction:
mant times you need to test exec stored procedure with parameter datetime



Main Content:

 set QUOTED_IDENTIFIER ON

GO

ALTER procedure [dbo].[GetDataForDateRange]

@FromDate datetime,

@ToDate datetime,


AS

BEGIN

 -- SET NOCOUNT ON added to prevent extra result sets from

 -- interfering with SELECT statements.

 SET NOCOUNT ON;


    -- Insert statements for procedure here

--write query here 


END




 To test the above query do as below:


DECLARE @d1 DATETIME

SELECT @d1 = GETDATE()-70

DECLARE @d2 DATETIME

SELECT @d2 = GETDATE()-10


exec GetDataForDateRange @d1, @d2


Conclusion:
This way you can test exec stored procedure with parameter datetime



About Writer:
Hi Everyone,I am .net Developer From Pune


Writer's Link:

Writer's Email:







Comments:
Post Comment





Similar Articles Top ArticlesLatest Articles Other Articles by this Author







www.freejobsreference.com Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)